Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # main.py
- class O:
- def __init__(self):
- print("O")
- super().__init__()
- class A(O):
- def __init__(self):
- print("A")
- super().__init__()
- class B(O):
- def __init__(self):
- print("B")
- super().__init__()
- class C(O):
- def __init__(self):
- print("C")
- super().__init__()
- class D(O):
- def __init__(self):
- print("D")
- super().__init__()
- class E(O):
- def __init__(self):
- print("E")
- super().__init__()
- class K1(A, B, C):
- def __init__(self):
- print("K1")
- super().__init__()
- class K2(B, D):
- def __init__(self):
- print("K2")
- super().__init__()
- class K3(C, D, E):
- def __init__(self):
- print("K3")
- super().__init__()
- class X(K1, K2, K3):
- def __init__(self):
- print("X")
- super().__init__()
- X()
- print(X.__mro__)
- print([i.__name__ for i in X.__mro__])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement