MRO and C3 linearisation

hard

One rule, applied repeatedly: take the head of the first list whose head appears in no other list's tail. See why the diamond resolves to D, B, C, A rather than depth-first, and why an inconsistent hierarchy raises TypeError at class-creation time.

Worst O(n²) in the number of classesSpace O(n)
Loading mro and c3 linearisation

Read the questions this explains