Python · Classes and Object Design · Intermediate · 30 min read
Python Inheritance, the MRO and super(): Method Resolution, Mixins and When Not to Inherit
Understand how Python resolves methods across parent classes. Learn single and multiple inheritance, the C3 method resolution order, how super() really works (and why it is cooperative), mixins, designing __init__ in hierarchies, the Liskov substitution principle, and why composition is often the better choice.
Create an account to start
Create a free account to see what this lesson covers
- Every free lesson in every section, in full
- Track your progress and pick up where you left off
- Free practice questions and an incident simulation
- Takes under a minute: name, email and a password
No card needed. Full access to Python is a paid upgrade you can choose later.