diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index b4fbd32..36c1608 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2182,12 +2182,7 @@ PyObject * PyIter_Next(PyObject *iter) { PyObject *result; - if (!PyIter_Check(iter)) { - PyErr_Format(PyExc_TypeError, - "'%.100s' object is not an iterator", - iter->ob_type->tp_name); - return NULL; - } + assert(PyIter_Check(iter)); result = (*iter->ob_type->tp_iternext)(iter); if (result == NULL && PyErr_Occurred() && |