title: I don't understand the order of methods in python
body: <p>I don't understand why the code uses the print_me method from Class D, and not the method in class A. </p>
  
  <p>I did some testing using print-statements and can see that it reads the print_me-method of class D before initialising class A, but I don't understand why it doesn't do the same for class A. </p>
  
  <pre><code>class A:
      name = "Alfa"
  
      def __init__(self, foo):
          self.foo = foo
          foo = 100
          self.print_me()
  
      def print_me(self):
          print(self.name, self.foo)
  
  class B(A):
      name = "Beta"
  
      def __init__(self, bar = 40):
          self.bar = bar
          print(self.name, bar)
  
  class C:
      name = "Charlie"
  
  class D(A, C):
      name = "Delta"
  
      def __init__(self, val):
          A.__init__(self, val)
  
      def print_me(self):
          print(self.name, "says", self.foo)
  
  d = D(60)
  </code></pre>
  
  <p>The output is: Delta says 60</p>
  
  <p>I thought it would be: Delta 60</p>