June 2019
Beginner to intermediate
770 pages
19h 24m
English
A decorated class construction is a nested set of several two-stage processes. Making class construction more complex is the way references are made to class methods. The references involve a multistep lookup. An object's class will define a Method Resolution Order (MRO). This defines how base classes are searched to locate an attribute or method name. The MRO works its way up the inheritance hierarchy; this is how a subclass name can override a name in a superclass.
The outermost part of the nesting is processing the class statement as a whole. This has two stages: building the class, and applying the decorator functions. Within the class statement processing, the individual method definitions can also have ...
Read now
Unlock full access