[issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute
![](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> _______________________________________
4080
Age (days ago)
4080
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nick Coghlan