This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Trundle, daniel.urban, eric.araujo, pitrou, rhettinger
Date 2011-03-20.20:17:59
SpamBayes Score 1.1782471e-08
Marked as misclassified No
Message-id <1300652279.76.0.873075035374.issue10977@psf.upfronthosting.co.za>
In-reply-to
Content
> By the way, PyList_SetItem() already has an 
> abstract counterpart called PyObject_SetItem(), 
> so changing this one seems useless.

The problem isn't a lack of available abstract
functions. If some code uses PyObject_SetItem(),
then it already works for both list and dict
subclasses. The issue arises only for code that is 
already using PyDict_SetItem() or PyList_SetItem().

The concrete methods pre-date the abstract methods
and pre-date the ability to subclass built-in types.
Those concrete methods were never updated to reflect
the new reality.  They now only make sense for exact
type matches because they know nothing about 
subclasses and their invariants.


IOW, if some patch is accepted, it needs to be aimed
at the concrete functions to make them subclass aware.
History
Date User Action Args
2011-03-20 20:17:59rhettingersetrecipients: + rhettinger, pitrou, eric.araujo, Trundle, daniel.urban
2011-03-20 20:17:59rhettingersetmessageid: <1300652279.76.0.873075035374.issue10977@psf.upfronthosting.co.za>
2011-03-20 20:17:59rhettingerlinkissue10977 messages
2011-03-20 20:17:59rhettingercreate