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-December/040614.html below:

[Python-Dev] Re: "groupby" iterator

[Python-Dev] Re: "groupby" iterator [Python-Dev] Re: "groupby" iteratorJeremy Fincher fincher.8 at osu.edu
Tue Dec 2 16:54:34 EST 2003
On Tuesday 02 December 2003 11:02 am, Paul Moore wrote:
> Alex Martelli <aleaxit at yahoo.com> writes:
> > Since these functions or types are going to be in operator, I think
> > we can afford to "spend" two names to distinguish functionality
> > (even though attgetter and itemgetter look nowhere as neat as
> > extract -- I don't have better suggestions offhand).
>
> operator.getattr and operator.getitem?

I think the functions they're talking about are actually right-curried 
versions of those functions, like this:

def attrgetter(attr):
    return lambda x: getattr(x, attr)

Jeremy

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