
Nov. 28, 2003
9:46 p.m.
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/)