PyList_Insert() et al.
13 Jul
2002
13 Jul
'02
1 p.m.
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
7952
Age (days ago)
7952
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Abrahams