Consume an iterable

Muhammad Alkarouri malkarouri at gmail.com
Sat Jan 23 08:55:12 EST 2010


On 23 Jan, 13:32, Peter Otten <__pete... at web.de> 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.

Done. http://bugs.python.org/issue7764

Thanks for all the effort.

Muhammad



More information about the Python-list mailing list