Attribute lookup resolves a Python attribute name through an object's instance, class, inheritance hierarchy, and ultimate base object. This explains why an object can use its own attributes as well as behavior inherited from its classes. section 10.12
Use attribute lookup to reason about:
- Instance attributes assigned through self, such as x. section 10.12
- Methods found on a class or inherited from a parent class. section 10.12
- Class-level declarations used with instances, including dataclass fields. section 10.12
Inherited method lookup
Bar inherits from Foo. A Bar instance therefore uses Foo's x2 method and Bar's x3 method; both methods resolve x through the instance.

