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/2005-August/055502.html below:

[Python-Dev] PEP 309: Partial method application

[Python-Dev] PEP 309: Partial method application [Python-Dev] PEP 309: Partial method applicationShane Hathaway shane at hathawaymix.org
Thu Aug 18 22:13:31 CEST 2005
Martin v. Löwis wrote:
> So I would propose the syntax
> 
>   lst.sort(key=virtual.lower) # where virtual is functional.virtual

Ooh, may I say that idea is interesting!  It's easy to implement, too:

class virtual:
     def __getattr__(self, name):
         return lambda obj: getattr(obj, name)()
virtual = virtual()

Shane
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