Re: itertools doc example "consume"

2013-03-08 Thread Skip Montanaro
Ian Kelly gmail.com> writes: > Depending on your Python version lst is either a range object or a > list, neither of which is an iterator. If you pass to consume an > iterable object that is not an iterator, it will implicitly obtain an > iterator for it, consume from the iterator, and then disc

Re: itertools doc example "consume"

2013-03-08 Thread Ian Kelly
On Fri, Mar 8, 2013 at 1:28 PM, Skip Montanaro wrote: > I've never really used itertools before. While trying to figure out > how to break a list up into equal pieces, I came across the consume > function in the examples here: > > http://docs.python.org/2/library/itertools.html > > It seems to me