commit | 613bed3726af921be64900bd0cb8209193873411 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Tue Jul 16 20:24:46 2002 +0000 |
committer | Guido van Rossum <guido@python.org> | Tue Jul 16 20:24:46 2002 +0000 |
tree | fcb29d8f30605df0371a24b50bfe1d6e504bec47 | |
parent | 6b6272c8575879cb792d2ea76544597c27ab0de4 [diff] |
Make StopIteration a sink state. This is done by clearing out the object references (it_seq for seqiterobject, it_callable and it_sentinel for calliterobject) when the end of the list is reached. Also remove the next() methods -- 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).