[Python-Dev] "groupby" iterator

Guido van Rossum guido at python.org
Sun Nov 30 16:54:23 EST 2003


> I concur: "overloading" extract to mean (the equivalent of) either
> getattr or getitem depending on the argument type doesn't look
> good, besides making it unusable to extract some items from dicts.

Agreed.  I've seen too many of such "clever" overloading schemes in a
past life.

> 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).

Right.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list