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-November/040556.html below:

[Python-Dev] Re: "groupby" iterator

[Python-Dev] Re: "groupby" iteratorDavid Eppstein eppstein at ics.uci.edu
Sun Nov 30 23:42:18 EST 2003
On 11/30/03 11:35 PM -0500 Raymond Hettinger <python at rcn.com> wrote:
> Okay, I've decided on this one.
>
> Though David's idea is attractive in its generality, the use cases favor
> the previous implementation.  IOW, there is a reasonable use case for
> skipping or partially consuming the subiterators (e.g. "sort s | uniq"
> and  "sort s | uniq -d").  For the delinguent subiterators, the user can
> just convert them to a list if they are going to be needed later:

My implementation will skip or partially consume the subiterators, with 
only a very temporary additional use of memory, if you don't keep a 
reference to them.
But I can see your arguments about visible vs silent failure modes and code 
complexity.
-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science


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