title: Python: Inherit the superclass __init__
body: <p>I have a base class with a lot of <code>__init__</code> arguments:</p>
  
  <pre><code>class BaseClass(object):
      def __init__(self, a, b, c, d, e, f, ...):
          self._a=a+b
          self._b=b if b else a
          ...
  </code></pre>
  
  <p>All the inheriting classes should run <code>__init__</code> method of the base class.</p>
  
  <p>I can write a <code>__init__()</code> method in each of the inheriting classes that would call the superclass <code>__init__</code>, but that would be a serious code duplication:</p>
  
  <pre><code>class A(BaseClass):
      def __init__(self, a, b, c, d, e, f, ...):
          super(A, self).__init__(a, b, c, d, e, f, ...)
  
  class B(BaseClass):
      def __init__(self, a, b, c, d, e, f, ...):
          super(A, self).__init__(a, b, c, d, e, f, ...)
  
  class C(BaseClass):
      def __init__(self, a, b, c, d, e, f, ...):
          super(A, self).__init__(a, b, c, d, e, f, ...)
  
  ...
  </code></pre>
  
  <p>What's the most Pythonic way to automatically call the superclass <code>__init__</code>? </p>