Kushal Das added the comment:
In Objects/typeobject.c we have subtype_setdict function, in which at line 1830
we have PyDict_Check() macro call, which checks if it is a subclass of dict or
not.
The definition is in Include/dictobject.h
#define PyDict_Check(op) \
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS)
We can stop assigning anything other than dict in typesobject.c but that will
break other things like http://bugs.python.org/issue1475692
----------
nosy: +kushaldas
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue1475692>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com