Remove dead code (unreachable)

This commit is contained in:
Raymond Hettinger 2015-08-15 15:09:30 -07:00
parent 1cadf769b3
commit 98958fedb6
1 changed files with 2 additions and 5 deletions

View File

@ -940,12 +940,9 @@ cycle_next(cycleobject *lz)
} }
return item; return item;
} }
if (PyErr_Occurred()) { /* Note: StopIteration is already cleared by PyIter_Next() */
if (PyErr_ExceptionMatches(PyExc_StopIteration)) if (PyErr_Occurred())
PyErr_Clear();
else
return NULL; return NULL;
}
if (PyList_Size(lz->saved) == 0) if (PyList_Size(lz->saved) == 0)
return NULL; return NULL;
it = PyObject_GetIter(lz->saved); it = PyObject_GetIter(lz->saved);