[issue44019] operator.call/operator.__call__
STINNER Victor
report at bugs.python.org
Mon Aug 30 11:51:53 EDT 2021
STINNER Victor <vstinner at python.org> added the comment:
> An actual use case I had for such an operator was collecting a bunch of callables in a list and wanting to dispatch them to concurrent.futures.Executor.map, i.e. something like `executor.map(operator.call, funcs)` (to get the parallelized version of `[func() for func in funcs]`).
Can't you use functools.partial() for that?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44019>
_______________________________________
More information about the Python-bugs-list
mailing list