A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-February/085870.html below:

[Python-Dev] Missing operator.call

[Python-Dev] Missing operator.call [Python-Dev] Missing operator.callHrvoje Niksic hrvoje.niksic at avl.com
Wed Feb 4 14:35:58 CET 2009
Andrew Bennetts wrote:
> A patch to add operator.caller(*args, **kwargs) may be a good idea.  Your
> example would then be:
> 
>     map(operator.caller(), lst)

Regarding the name, note that I proposed operator.call (and 
operator.__call__) because it corresponds to the __call__ special 
method, which is analogous to how operator.neg corresponds to __neg__, 
operator.add to __add__, etc.  The term "caller" implies creation of a 
new object that carries additional state, such as method name in 
operator.methodcaller, item in operator.itemgetter, or attr in 
operator.attrgetter.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4