title: Python Class Inheritance: How to initialize a subclass with values not in the parent class
body: <p>I'm trying to learn more about classes and OOP.</p>
  
  <p>How can I have my <code>Person</code> class initialize with all the values of <code>Entity</code> but also with a value that may not be contained in the <code>Entity</code> class? </p>
  
  <p>For example, both <code>Person</code> and <code>Spirit</code> inherit from <code>Entity</code>. However, only a <code>Person</code> would have a <code>gender</code>. How can I have <code>Person</code> initialize with <code>gender</code> as well?</p>
  
  <p>After that, would I still be able to create an instance of <code>Person</code> and call <code>describe()</code> in the same way I've done below?</p>
  
  <pre class="lang-python prettyprint-override"><code>class Entity(object):
  
      def __init__(self, state, name, age):
          self.state = state
          self.name = name
          self.age = age
  
  class Person(Entity):
  
      def describe(self):
          print "Identification: %s, %s, %s." % (self.state, self.name, self.age)
  
  class Spirit(Entity):
      pass  # for now
  
  steve = Person("human", "Steve", "23" # can I then list gender here?)
  steve.describe()
  </code></pre>