Question 36
What error is raised if a class hierarchy creates an invalid/inconsistent MRO during class definition?
If C3 linearization cannot construct a valid order, Python raises a TypeError at class definition time. For example, if X is a base class of Y and a class Z tries to inherit from X before Y (e.g., class Z(X, Y)), the required ordering can conflict with Y's inheritance from X, producing an inconsistent MRO.