(original) (raw)


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