Removed duplicate test from inner loop.

The PyIter_Check is already performed by PyObject_GetIter.
This commit is contained in:
Raymond Hettinger 2003-03-01 01:44:32 +00:00
parent 6f177d434f
commit 8049dde8d7
1 changed files with 1 additions and 6 deletions

View File

@ -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() &&