Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

I'm just pointing out a problem.  Lots of existing code uses the concrete API 
and that code can break subclasses of builtin types (possibly resulting in 
segfaults).

I don't really care what is done about it.  I'm just observing that the current 
design of the concrete API is incompatible with subclassing of built-in types.

A practical consequence is that I don't see how to write a fast, light C 
version of OrderedDict that would be safe from calls to PyDict_SetItem().  
AFAICT, there is no mechanism for adding extra state to a built-in type and 
being able to guarantee even very simple invariants.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10977>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to