Consume an iterable

Muhammad Alkarouri malkarouri at
Sat Jan 23 14:55:12 CET 2010

On 23 Jan, 13:32, Peter Otten <__pete... at> wrote:
> Muhammad Alkarouri wrote:
> > The next function performs much better. It is also much more direct
> > for the purposes of consume and much more understandable (at least for
> > me) as it doesn't require a specialized data structure which is
> > subsequently not used as such.
> > I am thus inclined to report it as a python documentation enhancement
> > (bug) request. Any comments?
> I would support that as a the deque(..., maxlen=0) trick is a bit too clever
> for my taste.
> Peter
> PS: Remember to include the bug fix for n=0 if you proceed.


Thanks for all the effort.


More information about the Python-list mailing list