Re: [Python-ideas] [Python-Dev] itertools.chunks(iterable, size, fill=None)

July 3, 2012
4:23 a.m.
On Jul 1, 2012, at 5:01 AM, Stefan Behnel wrote:
To address the main problem of users not finding what they need, what about simply extending the docstring of the grouper()
Here's a small change to the docstring: http://hg.python.org/cpython/rev/d32f21d87363 FWIW, if you're interested in load balancing applications, George Sakkis's itertools recipe for roundrobin() may be of interest. Another interesting iterator technique that is not well known is the two-argument form of iter() which is a marvel for transforming callables into iterators: for block in iter(partial(f.read, 1024), ''): ... for diceroll in iter(partial(randrange(1, 7), 4): ... Raymond
4642
Age (days ago)
4642
Last active (days ago)
0 comments
1 participants
participants (1)
-
Raymond Hettinger