Advanced
Python
Q72 / 101
What is the __mro__ attribute and how is it computed?
Correct! Well done.
Incorrect.
The correct answer is B) The Method Resolution Order: the linearization of base classes used for attribute lookup, computed by C3 linearization
B
Correct Answer
The Method Resolution Order: the linearization of base classes used for attribute lookup, computed by C3 linearization
Explanation
MyClass.__mro__ is a tuple of the class itself and all ancestors in C3 linearization order. Python searches this sequence when resolving attribute names.
Progress
72/101