Neil Cerutti wrote: > On 2007-02-13, Peter Otten <[EMAIL PROTECTED]> wrote: >> Well, what problems ocurring with >> >> class A: pass >> class B: pass >> class C(A, B): pass >> >> could be avoided by writing >> >> class A: pass >> class B(A): pass >> class C(B): pass >> >> instead? > > With multiple inheritance, the choice of algorithm for Method > Resolution Ordering isn't obvious or trivial. As I understand it, > Python got it wrong for quite some time, allowing "bad" > hierarchies to compile, i.e., classes for which the properties of > local precedence ordering and monotonicity did not hold. > > URL:http://www.python.org/download/releases/2.3/mro/
Is it correct that as long as no classes occur twice in the hierarchy no such ambiguities can arise? Peter -- http://mail.python.org/mailman/listinfo/python-list