Kaydet (Commit) 8049dde8 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Removed duplicate test from inner loop.

The PyIter_Check is already performed by PyObject_GetIter.
üst 6f177d43
......@@ -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() &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment