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/2003-October/039739.html below:

copysort patch, was RE: [Python-Dev] inline sort option

copysort patch, was RE: [Python-Dev] inline sort optionAlex Martelli aleaxit at yahoo.com
Tue Oct 28 16:46:50 EST 2003
On Tuesday 28 October 2003 06:42 pm, Guido van Rossum wrote:
> > Hmmm... maybe one COULD make a custom descriptor that does support
> > both usages... and maybe it IS worth making the .sorted (or whatever
> > name) entry a case of exactly such a subtle custom descriptor...
>
> Thanks for the idea, I can use this as a perverted example in my talk
> at Stanford tomorrow.  Here it is:

Heh, cool!

> import new
>
> def curry(f, x, cls=None):
>     return new.instancemethod(f, x)

Hmmm, what's the role of the ", cls=None" argument here...?  I.e,
couldn't just

curry = new.instancemethod

be equivalent?


Alex


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