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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4