Commit 632d692e authored by Raymond Hettinger's avatar Raymond Hettinger

Issue #24161: Document that PyIter_Check() returns false positives for old-style instances.

parent 6c42d1c5
......@@ -14,6 +14,10 @@ There are two functions specifically for working with iterators.
Return true if the object *o* supports the iterator protocol.
This function can return a false positive in the case of old-style
classes because those classes always define a :c:member:`tp_iternext`
slot with logic that either invokes a :meth:`next` method or raises
a :exc:`TypeError`.
.. c:function:: PyObject* PyIter_Next(PyObject *o)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment