J
Jacek Generowicz
Given
fncs = [func1, func2, ..., funcN]
args = [arg1, arg2, ..., argN]
How should one spell
results = map(lambda f,a: f(a), fncs, args)
in order to get the result most quickly ?
Unfortunately "apply" takes a tuple of arguments, and there is no
"funcall"[*] in Python.
[*] def funcall(fn, *args):
return fn(*args)
fncs = [func1, func2, ..., funcN]
args = [arg1, arg2, ..., argN]
How should one spell
results = map(lambda f,a: f(a), fncs, args)
in order to get the result most quickly ?
Unfortunately "apply" takes a tuple of arguments, and there is no
"funcall"[*] in Python.
[*] def funcall(fn, *args):
return fn(*args)