Python Classes
Start hereDesign class hierarchies with inheritance and composition, override methods and use special methods and dataclasses to write expressive types.
6 learning goals
- 1.Build class hierarchies with inheritance
- 2.Override methods and program to shared interfaces
- 3.Choose between composition and inheritance
- 4.Give classes built-in behavior with special methods
- 5.Control attribute access with properties
- 6.Write concise data classes with dataclasses