title: How does multiple inheritance work with the super() and different __init__() arguments?
body: <p>I'm just diving into some more advanced python subjects (well, advanced to me at least). I am now reading about multiple inheritance and how you can use super(). I more or less understand the way the super function is used, but <strong>(1) What's wrong with just doing it like this</strong>?:</p>
  
  <pre><code>class First(object):
      def __init__(self):
          print "first"
  
  class Second(object):
      def __init__(self):
          print "second"
  
  class Third(First, Second):
      def __init__(self):
          First.__init__(self)
          Second.__init__(self)
          print "that's it"
  </code></pre>
  
  <p>On to super(), <a href="http://web.archive.org/web/20031002184114/www.amk.ca/python/writing/warts.html" rel="noreferrer">Andrew Kuchlings paper on Python Warts</a> says: </p>
  
  <blockquote>
    <p>usage of super() will also be correct when the Derived class inherits
    from multiple base classes and some or all of them have <strong>init</strong>
    methods</p>
  </blockquote>
  
  <p>So I rewrote the example above as follows:</p>
  
  <pre><code>class First(object):
      def __init__(self):
          print "first"
  
  class Second(object):
      def __init__(self):
          print "second"
  
  class Third(First, Second):
      def __init__(self):
          super(Third, self).__init__(self)
          print "that's it"
  </code></pre>
  
  <p>This however, only runs the first <strong>init</strong> it can find, which is in <code>First</code>. <strong>(2) Can <code>super()</code> be used to run both the init's from <code>First</code> and <code>Second</code>, and if so, how?</strong> Running <code>super(Third, self).__init__(self)</code> twice just runs First.<strong>init</strong>() twice..</p>
  
  <p>To add some more confusion. What if the inherited classes' <strong>init</strong>() functions take different arguments. For example, what if I had something like this:</p>
  
  <pre><code>class First(object):
      def __init__(self, x):
          print "first"
  
  class Second(object):
      def __init__(self, y, z):
          print "second"
  
  class Third(First, Second):
      def __init__(self, x, y, z):
          First.__init__(self, x)
          Second.__init__(self, y, z)
          print "that's it"
  </code></pre>
  
  <p><strong>(3) How would I be able to supply the relevant arguments to the different inherited classes init functions using super()?</strong></p>
  
  <p>All tips are welcome!</p>
  
  <p>ps. Since I have several questions I made them bold and numbered them..</p>