[Python-ideas] operator.call / operator.__call__
Yann Kaiser
kaiser.yann at gmail.com
Thu Oct 30 00:23:03 CET 2014
How would this be different from using functools.partial?
On Wed, Oct 29, 2014, 23:40 Antony Lee <antony.lee at berkeley.edu> wrote:
> 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
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141029/a9c1e5a4/attachment.html>
More information about the Python-ideas
mailing list