Re: [Python-ideas] [Python-Dev] itertools.chunks(iterable, size, fill=None)

July 5, 2012
1:47 p.m.
On Sun, Jul 1, 2012 at 3:01 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
In appeared that "chunking" and "grouping" are different kind of tasks. You can chunk a sequence (sting) by slicing it into smaller sequences, but you can not chunk in iterable - you can only group it. There is an data loss about the structure that occurs when a sequence (string) becomes an iterator: chunks ABCDE -> AB CD E group ABCDE -> A B C D E -> (A B) (C D) (D E)
4640
Age (days ago)
4640
Last active (days ago)
0 comments
1 participants
participants (1)
-
anatoly techtonik