![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
1 Jul
2013
1 Jul
'13
7:35 a.m.
Nick Coghlan added the comment: Unfortunately, it's not that simple, as calling type(name, bases, namespace) is *exactly* what a subclass will do as part of creating the type object.
From inside the type implementation, we can't tell the difference between "properly called from the child type" and "improperly called without preparing the namespace first".
---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18334> _______________________________________