title: python constructor of derived class
body: <pre><code>class baseClass():
    def __init__(self,mark,name):
      self.mark = mark
      self.name = name
  
  class derivedClass(baseClass):
  
  b1 = derivedClass(name='Jibin')
  print b1.name
  </code></pre>
  
  <p>This was my code initially &amp; it worked fine.</p>
  
  <p>(Note: I don't have access to <code>baseClass</code>)</p>
  
  <p>But later I had to pass a additional attribute <code>rank</code> to <code>derivedClass</code>.So I edited the code like this.</p>
  
  <pre><code>class baseClass():
    def __init__(self,mark,name):
      self.mark = mark
      self.name = name
  
  class derivedClass(baseClass):
    def __init__(self,rank):
      self.rank = rank 
  
  b1 = derivedClass(name='Jibin')
  print b1.name
  </code></pre>
  
  <p>This caused an error <code>__init__() got an unexpected keyword argument 'name'</code></p>
  
  <p>This was expected as the <code>__init__</code> of <code>derivedClass</code> do not have a argument <code>name</code>.</p>
  
  <p>I don't want to add an additional argument <code>name</code> to <code>__init__</code> of <code>derivedClass</code> b'cos in real <code>baseClass</code> has ten arguments instead of 2(mark,name) &amp; if i give all them as additional argument to  <code>derivedClass</code> I will be cluttering its argument list.</p>
  
  <p>Note: I am aware of initializing baseClass using <code>baseClass.__init__(self)</code> or <code>super(derivedClass, self).__init__()</code></p>