Mention that type.__prepare__() exists for use via super().
This commit is contained in:
parent
8f149af2f9
commit
2ca9a1402a
|
@ -132,6 +132,10 @@ Invoking the Metaclass
|
|||
assignment algorithm. (Note also that 'metaclass' is a keyword-
|
||||
only argument as per PEP 3102 [6].)
|
||||
|
||||
Even though __prepare__ is not required, the default metaclass
|
||||
('type') implements it, for the convenience of subclasses calling
|
||||
it via super().
|
||||
|
||||
__prepare__ returns a dictionary-like object which is used to store
|
||||
the class member definitions during evaluation of the class body.
|
||||
In other words, the class body is evaluated as a function block
|
||||
|
|
Loading…
Reference in New Issue