Am 06.01.2014 14:31, schrieb Victor Stinner:
You can use partial.functools(), example:

def f(*args, **kw): print(args, kw)
...
import functools
g = functools.partial(f, 1, 2, 3, key='value')

g()
((1, 2, 3), {'key': 'value'})

Victor


Sure, that works. But while currying might be intellectually exciting, it makes the code even more verbose.

And it might negatively effect performance .. it'll produce lots of short lived functions under the hood, or not?

/Tobias

Reply via email to