[Python-ideas] Batching/grouping function for itertools
Ron Adam
ron3200 at gmail.com
Sun Dec 8 16:13:06 CET 2013
On 12/08/2013 05:05 AM, Nick Coghlan wrote:
> The main argument in favour of offering sliding_window and
> discrete_window as itertools is that they each rely on a sophisticated
> trick in iterator state manipulation:
How about 2 lower level building blocks that would make these things easier
to make and think about.
Possibly function to take the next n items of an iterator without advancing it.
Along with a function to advance an iterator n ahead without taking anything.
These would be simpler and easier to maintain, and have a wider range of uses.
Cheers,
Ron
More information about the Python-ideas
mailing list