语言

__mro__: method resolution order

C3 Linearization Algorithm : C3 Linearization algorithm is an algorithm that uses new-style classes. It is used to remove an inconsistency created by DLR Algorithm. It has certain limitation they are:

  • Children precede their parents

  • If a class inherits from multiple classes, they are kept in the order specified in the tuple of the base class.

C3 Linearization Algorithm works on three rules:

  • Inheritance graph determines the structure of method resolution order.

  • User have to visit the super class only after the method of the local classes are visited.

  • Monotonicity

Last updated

Was this helpful?