title: MRO with multiple inheritance in python
body: <p>In the documentation on the <a href="http://docs.python.org/2/tutorial/classes.html#multiple-inheritance" rel="nofollow">Python webpage</a> the method resolution order for classic classes in python is described as a depth-first left-to-right search. I tried to test this with this piece of code:</p>
  
  <pre><code>class A(object):
  def __init__(self):
      print "Initialized A"
  
  class B(A):
      def test():
          print "Initialized B"
  
  class C(A):
      def __init__(self):
          print "Initialized C"
  
  class D(B, C):
      def __init__(self):
          super(D, self).__init__()
          print "Initialized D"
  </code></pre>
  
  <p>When I create an instance of object D:</p>
  
  <pre><code>D()
  </code></pre>
  
  <p>I get the result:</p>
  
  <pre><code>Initialized C
  Initialized D
  </code></pre>
  
  <p>While I expected the prints "Initialized A", "Initialized D" since the MRO is depth-first, the initialization is first searched in B, when not found (which is the case) it should go deeper in the hierarchy and look for the function in the base class of B (i.e. A). Can someone give me an explanation why I get the init-function of C instead of that one of A?</p>