Why aren't all the base classes constructors being called?
<p>In Python 2.7.10</p>

<pre><code>class OneMixin(object):
    def __init__(self):
        # super(OneMixin, self).__init__()
        print "one mixin"

class TwoMixin(object):
    def __init__(self):
        # super(TwoMixin, self).__init__()
        print "two mixin"

class Account(OneMixin, TwoMixin):
    def __init__(self):
        super(Account, self).__init__()
        print "account"
</code></pre>

<p>The Account.mro() is: <code>[&lt;class 'Account'&gt;, &lt;class 'OneMixin'&gt;, &lt;class 'TwoMixin'&gt;, &lt;type 'object'&gt;]</code></p>

<p>Although every class is listed in the MRO, "two mixin" is not printed.</p>

<p>If I uncomment the super calls in OneMixin and TwoMixin, the MRO is exactly the same, but the "two mixin" IS printed.</p>

<p>Why the difference?  I would expect every thing in the MRO to be called.</p>

<p>This is because <code>super</code> is used to delegate the calls to either parent or sibling class of a type. <a href="https://docs.python.org/2.7/library/functions.html#super" rel="nofollow">Python documentation</a> has following description of the second use case:</p>

<blockquote>
  <p>The second use case is to support cooperative multiple inheritance in a dynamic execution environment. This use case is unique to Python and is not found in statically compiled languages or languages that only support single inheritance. This makes it possible to implement âdiamond diagramsâ where multiple base classes implement the same method. Good design dictates that this method have the same calling signature in every case (because the order of calls is determined at runtime, because that order adapts to changes in the class hierarchy, and because that order can include sibling classes that are unknown prior to runtime).</p>
</blockquote>

<p>If you remove the <code>super</code> call from <code>OneMixin</code> there's nothing delegating the call to the next type in MRO.</p>

python python-2.7