[docs] [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute

Nick Coghlan report at bugs.python.org
Mon Jul 1 09:35:31 CEST 2013


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 at bugs.python.org>
<http://bugs.python.org/issue18334>
_______________________________________


More information about the docs mailing list