title: Force specific __init__ execution with multiple inheritance in Python
body: <p>I'm trying to get the order of <code>__init__</code> executions right. The hierarchy consists of two branches. The left branch implements some abstract methods of the right branch. In the right branch there is also a split. Now I'd like them to execute: left first top to bottom, and then right top to bottom.</p>
  
  <p>Is there a way to achieve that in Python 3?</p>
  
  <p>So basically the following should print the numbers in order (which it doesn't):</p>
  
  <pre><code>from abc import abstractmethod, ABCMeta
  
  class L1:
      def __init__(self):
          super().__init__()
          print(1)
  
  class R1(metaclass=ABCMeta):
      def __init__(self):
          super().__init__()
          print(3)
  
      @abstractmethod
      def m(self):
          pass
  
  class L2(L1):
      def __init__(self):
          super().__init__()
          print(2)
  
      def m(self):
          pass
  
  class R2a(R1):
      def __init__(self):
          super().__init__()
          print(4)
  
  class R2b(R1):
      def __init__(self):
          super().__init__()
          print(4)
  
  class X(L2, R2a):
      pass
  
  class Y(L2, R2b):
      pass
  
  x = X()
  print("--")
  y = Y()
  </code></pre>
  
  <p>Unfortunately I cannot change the order of L2 and R2 since L2 implements abstract methods of R2 (there will be errors if I change that).</p>
  
  <p>Is it possible?</p>
  
  <p>(Do you know a good way to think about MRO to solve such kind of problem easy?)</p>
  
  <p>EDIT: I thought I doesn't matter, but I want to note that in my real structure, there is actually a diamond on the L side like L2a(L1), L2b(L1) and L2(L1a, L2a). That's to completely split some functionality.</p>