diff options
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/typeobj.rst | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst index 03cb1b3..83bef7d 100644 --- a/Doc/c-api/typeobj.rst +++ b/Doc/c-api/typeobj.rst @@ -730,8 +730,7 @@ set. An optional pointer to a function that returns an iterator for the object. Its presence normally signals that the instances of this type are iterable (although - sequences may be iterable without this function, and classic instances always - have this function, even if they don't define an :meth:`__iter__` method). + sequences may be iterable without this function). This function has the same signature as :cfunc:`PyObject_GetIter`. @@ -742,9 +741,7 @@ set. An optional pointer to a function that returns the next item in an iterator, or raises :exc:`StopIteration` when the iterator is exhausted. Its presence - normally signals that the instances of this type are iterators (although classic - instances always have this function, even if they don't define a - :meth:`__next__` method). + normally signals that the instances of this type are iterators. Iterator types should also define the :attr:`tp_iter` function, and that function should return the iterator instance itself (not a new iterator |