A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-February/060364.html below:

[Python-Dev] any support for a methodcaller HOF?

[Python-Dev] any support for a methodcaller HOF? [Python-Dev] any support for a methodcaller HOF?Jean-Paul Calderone exarkun at divmod.com
Fri Feb 3 17:31:44 CET 2006
On Fri, 3 Feb 2006 07:00:26 -0800, Alex Martelli <aleaxit at gmail.com> wrote:
>
>On Feb 3, 2006, at 6:47 AM, Giovanni Bajo wrote:
>    ...
>> use itemgetter and friends but the "correct" way of doing a
>> defferred "x[1]"
>> *should* let you write "x[1]" in the code. This is my main
>> opposition to
>> partial/itemgetter/attrgetter/methodcaller: they allow deferred
>> execution
>> using a syntax which is not equivalent to that of immediate execution.
>
>I understand your worry re the syntax issue.  So what about Michael
>Hudson's "placeholder class" idea, where X[1] returns the callable
>that will do x[1] when called, etc?  Looks elegant to me...
>

FWIW,

<http://cvs.twistedmatrix.com/cvs/sandbox/glyph/eacher.py?view=markup&rev=12804>
<http://cvs.twistedmatrix.com/cvs/sandbox/cake.py?view=markup&rev=12804>

Jean-Paul
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