]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Make StopIteration a sink state. This is done by clearing out the
authorGuido van Rossum <guido@python.org>
Tue, 16 Jul 2002 20:07:32 +0000 (20:07 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 16 Jul 2002 20:07:32 +0000 (20:07 +0000)
commit86103ae53161a136a53d031190c2d0579dba2abf
treeab25d196fdfec182a131b3472b6559053c16c4f6
parent9534e14033f26b32ed75c02a6a51bfe47c7f16a9
Make StopIteration a sink state.  This is done by clearing out the
it_seq field when the end of the list is reached.

Also remove the next() method -- one is supplied automatically by
PyType_Ready() because the tp_iternext slot is set.  That's a good
thing, because the implementation given here was buggy (it never
raised StopIteration).
Objects/listobject.c