Method Resolution Order (MRO)
Let's discuss MRO and how it can be useful.
Overview of MRO
Method Resolution Order (MRO) is just a list of types that the class is
derived from. So if we have a class that inherits from two other classes, we might think that its MRO will be itself and the two parents it inherits from.
However the parents also inherit from Python’s
base class: Object
.
Simple example of MRO
Let’s take a look at an example that will make this clearer:
Get hands-on with 1400+ tech skills courses.