We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef7dc8 commit 7de6174Copy full SHA for 7de6174
Doc/reference/datamodel.rst
@@ -1945,7 +1945,8 @@ Preparing the class namespace
1945
Once the appropriate metaclass has been identified, then the class namespace
1946
is prepared. If the metaclass has a ``__prepare__`` attribute, it is called
1947
as ``namespace = metaclass.__prepare__(name, bases, **kwds)`` (where the
1948
-additional keyword arguments, if any, come from the class definition).
+additional keyword arguments, if any, come from the class definition). The
1949
+``__prepare__`` method should be implemented as a :func:`classmethod`.
1950
1951
If the metaclass has no ``__prepare__`` attribute, then the class namespace
1952
is initialised as an empty ordered mapping.
0 commit comments