class X: pass class Y(X): pass class Z(X, Y): pass xyz = Z() # L[X] = [X] + merge([X]) # L[X] = [X] # L[Y] = [Y] + merge(L(X), [Y]) # L[Y] = [Y] + merge([X], [Y]) # L[Y] = [Y, X] + merge([Y]) # L[Y] = [Y, X] # L[Z] = [Z] + merge(L(X), L(Y), [X, Y]) # L[Z] = [Z] + merge([X], [Y, X], [X, Y]) # >> cannot pick X # >> cannot pick Y