[Python-Dev] PyList_Insert() et al.
David Abrahams
David Abrahams" <david.abrahams@rcn.com
Sat, 13 Jul 2002 09:00:01 -0400
Check it out:
int
PyList_Insert(PyObject *op, int where, PyObject *newitem)
{
if (!PyList_Check(op)) {
PyErr_BadInternalCall();
return -1;
}
return ins1((PyListObject *)op, where, newitem);
}
Since the implementation of ins1 gives the subclasses' re-implementation of
insert() no chance to execute, shouldn't this check be changed to
PyList_CheckExact?
If not, what needs to be added to the documentation to make it clear that
these functions really do subclass slicing?
-Dave