Is there an exact replacement for the old functional.curry?
<p>I am trying to run this snippet from <a href="http://www.ibm.com/developerworks/linux/library/l-prog3.html" rel="nofollow">http://www.ibm.com/developerworks/linux/library/l-prog3.html</a> on a python 2.6 runtime.</p>

<pre><code>from functional import *

taxcalc = lambda income,rate,deduct: (income-(deduct))*rate

taxCurry = curry(taxcalc)
taxCurry = taxCurry(50000)
taxCurry = taxCurry(0.30)
taxCurry = taxCurry(10000)
print "Curried taxes due =",taxCurry

print "Curried expression taxes due =", \
      curry(taxcalc)(50000)(0.30)(10000)
</code></pre>

<p>Ok, so I understand from <a href="http://www.python.org/dev/peps/pep-0309/" rel="nofollow">http://www.python.org/dev/peps/pep-0309/</a> that functional is renamed to functools and curry to partial but just doing the renames doesn't help. I get the error:</p>

<pre><code>taxCurry = taxCurry(50000)
TypeError: &lt;lambda&gt;() takes exactly 3 arguments (1 given)
</code></pre>

<p>The following does work but do I really have to change it so much? </p>

<pre><code>from functools import partial

taxcalc = lambda income,rate,deduct: (income-(deduct))*rate

taxCurry = partial(taxcalc)
taxCurry = partial(taxCurry, 50000)
taxCurry = partial(taxCurry, 0.30)
taxCurry = partial(taxCurry, 10000)
print "Curried taxes due =", taxCurry()

print "Curried expression taxes due =", \
      taxcalc(50000, 0.30, 10000)
</code></pre>

<p>Is there a better way of preserving the mechanics of the original example? Lastly was the original example truly currying or just partial application? (as per <a href="http://www.uncarved.com/blog/not_currying.mrk" rel="nofollow">http://www.uncarved.com/blog/not_currying.mrk</a>)</p>

<p>Thanks for your time</p>
