diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index df160f2cc3..0cdd0199b9 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1894,11 +1894,9 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals, PUSH(x); continue; } - if (!PyErr_Occurred() || - PyErr_ExceptionMatches( - PyExc_StopIteration)) - { - x = v = POP(); + if (!PyErr_Occurred()) { + /* iterator ended normally */ + x = v = POP(); Py_DECREF(v); JUMPBY(oparg); continue; |