[issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute
R. David Murray added the comment:
"Intentional" is not perhaps the exactly right term, but it is working as expected. There was a thread about this on python-dev ("PEP 3115 compliant dynamic type creation" and "adding types.build_class for 3.3"), that ultimately resulted in the addition of the 'new_class' function to the types module. The documentation should probably just say that types doesn't handle metaclass __prepare__, and provide a link to the new_class function.
----------
assignee: -> docs@python
components: +Documentation -Interpreter Core
nosy: +docs@python, ncoghlan, r.david.murray
versions: +Python 3.4
_______________________________________
Python tracker
participants (1)
-
R. David Murray