Issue #23757: Only call the concrete list API for exact lists.

This commit is contained in:
Raymond Hettinger 2015-05-17 14:45:58 -07:00
parent 6558190e52
commit 610a51f364
3 changed files with 16 additions and 1 deletions

View file

@ -1636,7 +1636,7 @@ PySequence_Tuple(PyObject *v)
Py_INCREF(v);
return v;
}
if (PyList_Check(v))
if (PyList_CheckExact(v))
return PyList_AsTuple(v);
/* Get iterator. */