On 23 Jan, 13:32, Peter Otten <__pete...@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 -- http://mail.python.org/mailman/listinfo/python-list