[issue6021] itertools.grouper

Lie Ryan report at bugs.python.org
Thu May 14 20:20:52 CEST 2009


Lie Ryan <lie.1296 at gmail.com> added the comment:

All implementations relying on zip or zip_longest breaks with infinite
iterable (e.g. itertools.count()).

And it is not impossible to define a clean, flexible, and familiar API
which will be similar to open()'s mode or unicode error mode. The modes
would be 'error' (default), 'pad', 'truncate', and 'partial' (maybe
should suggest a better name than 'partial')

> There is an issue with having too many itertools.  
> The module taken as a whole becomes more 
> difficult to use as new tools are added.

It should also be weighed that a lot of people are expecting for this
kind of function in itertools. I think there are other functions in
itertools that have more questionable value than groupers, such as starmap.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6021>
_______________________________________


More information about the Python-bugs-list mailing list