summaryrefslogtreecommitdiff
path: root/Include/abstract.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/abstract.h')
-rw-r--r--Include/abstract.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index f3bc8bcd0f..87afe9a640 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -636,7 +636,8 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
#define PyIter_Check(obj) \
(PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_ITER) && \
- (obj)->ob_type->tp_iternext != NULL)
+ (obj)->ob_type->tp_iternext != NULL && \
+ (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
PyAPI_FUNC(PyObject *) PyIter_Next(PyObject *);
/* Takes an iterator object and calls its tp_iternext slot,