I read this doc today. There is something confused me.
http://www.python.org/download/releases/2.3/mro/
In the example to prove the MRO of Python 2.2 breaks monotonicity,
>>> class A(object): pass
>>> class B(object): pass
>>> class C(object): pass
>>> class D(object): pass
>>> class E(object): pass
>>> class K1(A,B,C): pass
>>> class K2(D,B,E): pass
>>> class K3(D,A): pass
>>> class Z(K1,K2,K3): pass
I think the result that Python 2.2 will give linearizations for Z is:['Z', 'K1', 'C', 'K2', 'B', 'E', 'K3', 'D', 'A', 'object']
, however, the doc gives L[Z,P22] = Z K1 K3 A K2 D B C E O
and the doc said, this example is originally provided by Samuele Pedroni in here, and Samuele Pedroni's answer is the same as mine.
Is there anything I missed?
Why do you think that?
A quick try:
So the MRO for
Z
isZ K1 K3 A K2 D B C E object
, so the docs seem to be correct.