Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44579 > unrolled thread

Why chunks is not part of the python standard lib?

Started byRicardo Azpeitia Pimentel <razpeitia@gmail.com>
First post2013-05-01 01:26 -0500
Last post2013-05-01 01:26 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Why chunks is not part of the python standard lib? Ricardo Azpeitia Pimentel <razpeitia@gmail.com> - 2013-05-01 01:26 -0500

#44579 — Why chunks is not part of the python standard lib?

FromRicardo Azpeitia Pimentel <razpeitia@gmail.com>
Date2013-05-01 01:26 -0500
SubjectWhy chunks is not part of the python standard lib?
Message-ID<mailman.1207.1367389575.3114.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

After reading How do you split a list into evenly sized chunks in
Python?<http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python>
 and seeing this kind of mistakes happening
https://code.djangoproject.com/ticket/18972 all the time.

Why is not a chunks function in itertools?

grouper from http://docs.python.org/2/library/itertools.html#recipes doesn't
have the same behavior as chunks

Example:

chunks([1, 2, 3, 4, 5], 3)# Should return [[1, 2, 3], [4, 5]] or the
iterator equivalent.

Original Post on StackOverflow:
http://stackoverflow.com/questions/16313008/why-chunks-is-not-part-of-the-python-standard-lib

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web