
On Jun 30, 2012, at 10:44 PM, Stefan Behnel wrote:
Another addition could be a new subsection on grouping (chunking) that would discuss post-processing of grouper (as discussed above), as well as other recipes, including ones specific to strings and sequences. It would essentially be a short how-to. Call it 9.1.3 "Grouping, Blocking, or Chunking Sequences and Iterables". The synonyms will help external searching. A toc would let people who have found this doc know to look for this at the bottom.
If it really is such an important use case for so many people, I agree that it's worth special casing it in the docs. It's not a trivial algorithmic step from a sequential iterable to a grouped iterable.
I'm not too keen on adding a section like this to the itertools docs.
Instead, I would be open adding "further reading" section with external links to interesting iterator writeups in blogs, cookbooks, stack overflow answers, wikis, etc.
If one of you wants to craft an elegant blog post on "Grouping, Blocking, or Chunking Sequences and Iterables", I would be happy to link to it.
Raymond