File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -739,9 +739,11 @@ set.
739739
740740.. cmember :: iternextfunc PyTypeObject.tp_iternext
741741
742- An optional pointer to a function that returns the next item in an iterator, or
743- raises :exc: `StopIteration ` when the iterator is exhausted. Its presence
744- normally signals that the instances of this type are iterators.
742+ An optional pointer to a function that returns the next item in an iterator.
743+ When the iterator is exhausted, it must return *NULL *; a :exc: `StopIteration `
744+ exception may or may not be set. When another error occurs, it must return
745+ *NULL * too. Its presence signals that the instances of this type are
746+ iterators.
745747
746748 Iterator types should also define the :attr: `tp_iter ` function, and that
747749 function should return the iterator instance itself (not a new iterator
You can’t perform that action at this time.
0 commit comments