Chapter 8. The rules (and exceptions) of inheritance
This chapter covers
- Using inheritance and composition together to model systems
- Using Python built-ins to inspect object types
- Making interfaces more strict with abstract base classes
If you’ve written your own classes or used a class-based framework in Python, you’ve almost certainly encountered inheritance. Classes can inherit from other classes, ending up with their parent class’s data and behavior. In this chapter, you’ll learn the details of inheritance in Python, where it works well, and where it should be avoided.
8.1. The inheritance of programming past
Inheritance was conceived of in the early days of computer programming, but although it has existed for a long time, folks still ...
Get Practices of the Python Pro now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.