title: Implicitly invoking parent class initializer
body: <pre><code>class A(object):
      def __init__(self, a, b, c):
          #super(A, self).__init__()
          super(self.__class__, self).__init__()
  
  
  class B(A):
      def __init__(self, b, c):
          print super(B, self)
          print super(self.__class__, self)
          #super(B, self).__init__(1, b, c)
          super(self.__class__, self).__init__(1, b, c)
  
  class C(B):
      def __init__(self, c):
          #super(C, self).__init__(2, c)
          super(self.__class__, self).__init__(2, c)
  C(3)
  </code></pre>
  
  <p>In the above code, the commented out <code>__init__</code> calls appear to the be the commonly accepted "smart" way to do super class initialization. However in the event that the class hierarchy is likely to change, I have been using the uncommented form, until recently.</p>
  
  <p>It appears that in the call to the super constructor for <code>B</code> in the above hierarchy, that <code>B.__init__</code> is called again, <code>self.__class__</code> is actually <code>C</code>, not <code>B</code> as I had always assumed.</p>
  
  <p><strong>Is there some way in Python-2.x that I can maintain proper MRO (with respect to initializing all parent classes in the correct order) when calling super constructors while not naming the current class (the <code>B</code> in in <code>super(B, self).__init__(1, b, c)</code>)?</strong></p>