title: Python constructors in ABC inheritance chain for interfaces
body: <p>I've attempted to create a Python interface class hierachy that looks something like:</p>
  
  <pre><code>class Axis(object, metaclass=ABCMeta):
      def __init__(self):
          # Do stuff...
  
  class LinearAxis(Axis, metaclass=ABCMeta):
      @abstractmethod
      def move_linear(self, move_um):
          pass
  
      def __init__(self):
          # Do stuff...
          Axis.__init__(self)
  
  class RotationalAxis(Axis, metaclass=ABCMeta):
      @abstractmethod
      def move_rotate(self, move_degree):
          pass
  
      def __init__(self):
          # Do stuff...
          Axis.__init__(self)
  
  class XAxis(LinearAxis, metaclass=ABCMeta):
      def __init__(self):
          # Do stuff...
          LinearAxis.__init__(self)
  </code></pre>
  
  <p>So basically an interface sort of like that with a bunch more functions everywhere and stuff in the constructors etc...</p>
  
  <p>Then I go to derive off my interface:</p>
  
  <pre><code>class AnAxis(Axis):
      def __init__(self):
          # Do stuff...
          Axis.__init__(self)
  
  class AnLinearAxis(AnAxis, LinearAxis):
      def move_linear(self, move_um):
          pass
  
      def __init__(self):
          # Do stuff...
          AnAxis.__init__(self)
          LinearAxis.__init__(self)
  
  class AnRotationalAxis(AnAxis, RotationalAxis):
      def move_rotate(self, move_degree):
          pass
  
      def __init__(self):
          # Do stuff...
          AnAxis.__init__(self)
          RotationalAxis.__init__(self)
  
  class AnXAxis(AnLinearAxis, XAxis):
      def __init__(self):
          # Do stuff...
          AnLinearAxis.__init__(self)
          XAxis.__init__(self)
  </code></pre>
  
  <p>I'm trying to work out how to call the constructors properly.  The way I have it, I'm pretty sure I call the interface constructors many times...  So it's wrong...  Is there a preferred way to do it?  (Perhaps I don't call constructors in the interface classes, or I only call the interface constructor at the end up my implementation class.)</p>
  
  <p>Also, I've never coded in this style and am open to better ways to code this.</p>