A
Alan G Isaac
Consider an example due to Mertz (in Text Processing in Python):
apply_each = lambda fns, args=[]: map(apply, fns, [args]*len(fns))
This allows one to supply a list of functions and a tuple of arguments
to produce a list evaluating each function with those arguments.
But 'apply' is deprecated in favor of extended call syntax.
What is the equivalent with extended call syntax?
Thanks,
Alan Isaac
apply_each = lambda fns, args=[]: map(apply, fns, [args]*len(fns))
This allows one to supply a list of functions and a tuple of arguments
to produce a list evaluating each function with those arguments.
But 'apply' is deprecated in favor of extended call syntax.
What is the equivalent with extended call syntax?
Thanks,
Alan Isaac