PyDocs

Nav

Data Types

prepare_class

types

function · Added in 3.3 (source)
  • prepare_class(name, bases=(), kwds=None)
Call the __prepare__ method of the appropriate metaclass.

Returns (metaclass, namespace, kwds) as a 3-tuple

*metaclass* is the appropriate metaclass
*namespace* is the prepared class namespace
*kwds* is an updated copy of the passed in kwds argument with any
'metaclass' entry removed. If no kwds argument is passed in, this will
be an empty dict.
Changed in 3.6
  • 3.6: The default value for the namespace element of the returned tuple has changed. Now an insertion-order-preserving mapping is used when the metaclass does not have a __prepare__ method.
0 Examples
No examples for types/prepare_class.
See Also
No see-alsos for types/prepare_class
0 Notes
No notes for prepare_class