title: Why does Python's C3 MRO depend on a common base class?
body: <p>When I read about Python's C3 method resolution order, I often hear it reduced to "children come before parents, and the order of subclasses is respected". Yet that only seems to hold true if all the subclasses inherit from the same ancestor.</p>
  
  <p>E.g.</p>
  
  <pre><code>class X():
      def FOO(self):
          return 11
  
  class A(X):
      def doIt(self):
          return super().FOO()        
      def FOO(self):
          return 42
  
  class B(X):
      def doIt(self):
          return super().FOO()        
      def FOO(self):
          return 52
  
  class KID(A,B):
      pass
  </code></pre>
  
  <p>Here the MRO of KID is:
  KID, A, B, X</p>
  
  <p>However, if I changed B to be instead:</p>
  
  <pre><code>class B(object):
  </code></pre>
  
  <p>The MRO of KID becomes:
  KID, A, X, B</p>
  
  <p>It seems we are searching A's superclass before we have finished searching all KID's parents.</p>
  
  <p>So it seems a bit less intuitive now than "kids first, breadth first" to "kids first, breadth first if common ancestor else depth first".</p>
  
  <p>It would be quite the gotcha that if a class stopped using a common ancestor the MRO changes (even though the overall hierarchy is the same apart from that one link), and you started calling a deeper ancestor method rather than the one in that class.</p>