[issue5996] abstract class instantiable when subclassing dict

Daniel Urban report at bugs.python.org
Thu Aug 12 20:52:23 CEST 2010


Daniel Urban <urban.dani+py at gmail.com> added the comment:

I think, that the reason is that, object.__new__ checks, if the class is instantiable (object_new in Objects/typeobject.c ). dict.__new__ (and tuple.__new__, and I guess the __new__ method of other built-in types) doesn't call object.__new__, but user defined types typically either doesn't have a __new__, or call object.__new__ from it (directly or with super).

----------
nosy: +durban

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5996>
_______________________________________


More information about the Python-bugs-list mailing list