[issue13430] Add a curry function to the functools module
Marko Nervo
report at bugs.python.org
Fri Nov 18 17:59:42 CET 2011
Marko Nervo <marko at python.it> added the comment:
In [1]: import functools
In [2]: def adder(x, y, z):
...: return (x + y + z)
...:
In [3]: adder = functools.partial(adder)
In [4]: adder(2)(3)(4)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/marko/<ipython console> in <module>()
TypeError: adder() takes exactly 3 arguments (1 given)
No, it can't be replaced using functools.partial.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13430>
_______________________________________
More information about the Python-bugs-list
mailing list