[Python-ideas] operator.call / operator.__call__

Antony Lee antony.lee at berkeley.edu
Wed Oct 29 23:39:59 CET 2014


A simple suggestion: add "operator.call" and "operator.__call__", which
would provide a function like Python2's "apply" (but it'd be called with
already unpacked arguments, i.e. operator.call(f, *args, **kwargs)).
Why?  To be able to pass it as an argument to other function, just like the
other functions defined in the "operator" module.

Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141029/78d6da20/attachment.html>


More information about the Python-ideas mailing list