title: calling init for multiple parent classes with super?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7903398/can-super-deal-with-multiple-inheritance">Can Super deal with multiple inheritance?</a>  </p>
  </blockquote>
  
  
  
  <p>Python inheritance? I have a class structure (below), and want the child class to call the <code>__init__</code> of both parents. Is this possible to do in a 'super' way or is it just a terrible idea?</p>
  
  <pre><code>class Parent1(object):
      def __init__(self):
          self.var1 = 1
  
  class Parent2(object):
      def _init__(self):
          self.var2 = 2
  
  class Child(Parent1, Parent2):
      def __init__(self):
          ## call __init__ of Parent1
          ## call __init__ of Parent2
          ## super(Child, self).__init__()
  </code></pre>