MRAB wrote:

> So it's defined behaviour that an exhausted iterable will always raise
> StopIteration no matter how many times it's asked for the next value?

That is not enforced. However, quoting
http://www.python.org/dev/peps/pep-0234/

"""
Iterator implementations (in C or in Python) should guarantee that
once the iterator has signalled its exhaustion, subsequent calls
to tp_iternext or to the next() method will continue to do so.
"""

Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to