This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients docs@python, eric.snow, ncoghlan
Date 2013-03-14.20:33:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
(related to PEP 422 and issue #17044)

The execution namespace from a class definition is passed as the third argument to the metaclass (see builtin___build_class__() in Python/bltinmodule.c).  When applicable, which is almost always, the subsequent call to type.__new__() copies that namespace into a new dict which is in turn exposed via the class's __dict__.

This matters in the case where a metaclass with __prepare__() gets used (or the PEP 422 equivalent).  The language reference[1] should note that the object returned by __prepare__() is copied into a new dict when the class is finally created via the metaclass.

Date User Action Args
2013-03-14 20:33:35eric.snowsetrecipients: + eric.snow, ncoghlan, docs@python
2013-03-14 20:33:35eric.snowsetmessageid: <>
2013-03-14 20:33:35eric.snowlinkissue17422 messages
2013-03-14 20:33:34eric.snowcreate