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 William.Schwartz
Recipients William.Schwartz, docs@python
Date 2012-07-03.15:08:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341328118.33.0.670602196671.issue15243@psf.upfronthosting.co.za>
In-reply-to
Content
Section 3.3.3.2. "Preparing the class namespace" of the documentation (http://docs.python.org/dev/reference/datamodel.html#preparing-the-class-namespace) states that "If the metaclass has a __prepare__ attribute, it is called as ``namespace = metaclass.__prepare__(name, bases, **kwds)``...." This isn't quite true. By just defining a ``__prepare__`` method in a metaclass, the interpreter calls it as it would a static method -- there is no implicit first argument referring to ``metaclass`` as the documentation implies. The documentation should be amended to say that users can decorate ``__prepare__`` as a class method to get ``metaclass`` passed in as the implicit first argument.
History
Date User Action Args
2012-07-03 15:08:38William.Schwartzsetrecipients: + William.Schwartz, docs@python
2012-07-03 15:08:38William.Schwartzsetmessageid: <1341328118.33.0.670602196671.issue15243@psf.upfronthosting.co.za>
2012-07-03 15:08:37William.Schwartzlinkissue15243 messages
2012-07-03 15:08:37William.Schwartzcreate