Why chunks is not part of the python standard lib?

Chris Angelico rosuav at gmail.com
Thu May 2 08:55:50 EDT 2013


On Thu, May 2, 2013 at 10:52 PM, Oscar Benjamin
<oscar.j.benjamin at gmail.com> wrote:
> They are all easy to write as generator functions but to me the point
> of itertools is that you can do things more efficiently than a
> generator function. Otherwise code that uses a combination of
> itertools primitives is usually harder to understand than an
> equivalent generator function so I'd probably avoid using itertools.

Aren't most of the itertools primitives written in Python anyway? If
your code is harder to understand, just write the generator function!

ChrisA



More information about the Python-list mailing list