]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #24161: Document that PyIter_Check() returns false positives for old-style...
authorRaymond Hettinger <python@rcn.com>
Mon, 11 May 2015 17:22:20 +0000 (10:22 -0700)
committerRaymond Hettinger <python@rcn.com>
Mon, 11 May 2015 17:22:20 +0000 (10:22 -0700)
Doc/c-api/iter.rst

index 8d1567c7b34a99ed1663dae277c8060667928e8c..fb2a71cf1a825a85205c09b2d04abfc57d9b7530 100644 (file)
@@ -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)