Summary
We've gone from simple inheritance, one of the most useful tools in the object-oriented programmer's toolbox, all the way through to multiple inheritance, one of the most complicated. We learned how to:
- Add functionality to existing classes and built-ins using inheritance
- Share similar code between classes by abstracting it into a parent class
- Combine multiple threads of functionality using multiple inheritance
- Call parent methods using
super
- Format argument lists in multiple inheritance so super doesn't choke
In the next chapter, we'll cover the subtle art of handling exceptional circumstances.
Get Python 3 Object Oriented Programming 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.