[Python-Dev] Fw: MRO 2.2 vs 2.3

Guido van Rossum guido at python.org
Mon Oct 7 14:55:01 CEST 2002

> >If it's any consolation to you, you'd have to write a program with a
> >pretty, um, "wild and wonderful" inheritance lattice before this would
> >ever bite you.  It's also the case the the difference between the
> >current algorithm and C3 is pretty small; the biggest difference is
> >that in some extreme cases, when you write
> Its precisely this small set of differences that make this seem more
> like a bugfix than a new improved feature. 

No, because it can cause a silent change in semantics of correctly
working programs.  That's even more a no-no for bugfix releases than
breaking (== causing an exception to happen) in existing programs.

> I got the impression from lurking on the discussion that this new
> behaviour was intended and not achieved. Personally I found the
> reasoning about why one should do the extended precedence thing
> extremely tenuous as it seems to be based on assertions about programmer
> expectation. It's hard to believe that many can do high order graph
> analysis by inspection of the terminal node order.
> Does this new thing preserve current behaviours when adding more
> subclasses ie 
> B(A0,A1,...,Ak)
> C(A0,A1,....Ak,Ak+1)
> is it possible to say easily what happens?

This requires knowing the full lattice.

In any case, C3 won't make it into Python 2.2.2 because the code
hasn't been fully written and tested yet, and 2.2.2 goes inot beta
later today.

We'll see if it turns out to be such a boon that it deserves a 2.2.3

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-list mailing list