A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026435.html below:

[Python-Dev] PyList_Insert() et al.

[Python-Dev] PyList_Insert() et al. [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





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