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

[Python-Dev] "groupby" iterator

[Python-Dev] "groupby" iterator [Python-Dev] "groupby" iteratorGuido van Rossum guido at python.org
Fri Nov 28 16:46:53 EST 2003
> Here's yet another implementation for itertoolsmodule.c. (see
> attachment) I wrote it after the shower (really!) :)

Wow!  Thanks.  Let's all remember to take or showers and maybe Python
will become the cleanest programming language. :)

Raymond, what do you think?

I would make one change: after looking at another use case, I'd like
to change the outer iterator to produce (key, grouper) tuples.  This
way, you can write things like

  totals = {}
  for key, group in sequence:
      totals[key] = sum(group)

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

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