class Base: def __init__(self, a): self.x = a class A(Base): def __init__(self): super().__init__(5) class B(Base): def __init__(self, x): super().__init__(x) class C(A, B): ... class D(B, A): ...