Hello,

I have these types,

class A:
        def __init__(s):
                super().__init__()
                print("A")
class B(A):
        def __init__(s):
                super().__init__()
                print("B")
class C(A):
        def __init__(s):
                super().__init__()
                print("C")
class D(B,C):
        def __init__(s):
                super().__init__()
                print("D")

If I do (in 3.1)
>>> d=D()
A
C
B
D

Why this order? I thought, first to D, then B, then A. He prints "A".
He comes back in B and prints "B". He goes to C. Then somehow he
doesn't go again to A. He prints "C". Then back to D and prints "D".

Thanks,

Eric J.
-- 
http://mail.python.org/mailman/listinfo/python-list
  • mi Eric J. Van der Velden

Reply via email to