[issue1643] Add group() to itertools

2007-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I'm not interested in adding this to the module. Discussions to- date on the subject seem to show more interest in playing with grouper variants than in actual use cases. While the recipe given in the docs is somewhat opaque, it runs at C-speed (zer

[issue1643] Add group() to itertools

2007-12-17 Thread Kirk McDonald
New submission from Kirk McDonald: One question which is asked with surprising frequency in #python is how to yield multiple objects at a time from an iterable object. That is, given [1, 2, 3, 4, 5, 6], get [(1, 2), (3, 4), (5, 6)]. The "grouper" function in the itertools recipes page provides