We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 433282f commit e915a05Copy full SHA for e915a05
Python/ceval.c
@@ -3430,19 +3430,11 @@ _PyForIter_NextWithIndex(PyObject *seq, _PyStackRef index)
3430
}
3431
return PyStackRef_FromPyObjectNew(PyTuple_GET_ITEM(seq, i));
3432
3433
- size_t size = PyList_GET_SIZE(seq);
3434
- if ((size_t)i >= size) {
3435
- return PyStackRef_NULL;
3436
- }
3437
-#ifdef Py_GIL_DISABLED
3438
PyObject *item = _PyList_GetItemRef((PyListObject *)seq, i);
3439
if (item == NULL) {
3440
return PyStackRef_NULL;
3441
3442
return PyStackRef_FromPyObjectSteal(item);
3443
-#else
3444
- return PyStackRef_FromPyObjectNew(PyList_GET_ITEM(seq, i));
3445
-#endif
3446
3447
3448
/* Check if a 'cls' provides the given special method. */
0 commit comments