Method Resolution Order (MRO)
Let's discuss MRO and how it can be useful.
We'll cover the following...
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:
Access this course and 1400+ top-rated courses and projects.