Concepts·Certified Associate Python Programmer
Python Multiple Inheritance and MRO
The other half of PCAP objective 4.5. A class may have several parents, and the **method resolution order** decides which one wins. The order is left to right and depth-limited in a specific way, `super()` follows it rather than jumping to a parent, and some inheritance orders are impossible and rejected at class-creation time. Every claim on this page is printed from `__mro__` rather than reasoned about.
Object-Oriented Python Guide 19 of 25 Advanced
- Python3.14.4
- OSUbuntu 26.04 LTS
- pip25.1.1
- TimeAbout 18 min
- Reviewed23 August 2026
Written against the versions above. Python 3 uses C3 linearisation for the MRO, as Python 2.3 onwards did for new-style classes. Old-style classes had a simpler depth-first order and no longer exist.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| RUNNER01 | 192.168.0.27 | Ubuntu 26.04 LTS | Python 3.14.4 - the only machine this path needs | 2 Core | 4 GB | 50 GB |
Before you start
-
Two parents, and the order decides
-
The diamond
-
The diamond where only C defines the method
-
super follows the MRO, not the parent
-
An inheritance order Python refuses
-
Every class ends at object
-
A mixin, which is what multiple inheritance is really for
-
What the exam does with this objective