title: Inheritance and init method in Python
body: <p>I'm begginer of python. I can't understand inheritance and <code>__init__()</code>.</p>
  
  <pre><code>class Num:
      def __init__(self,num):
          self.n1 = num
  
  class Num2(Num):
      def show(self):
          print self.n1
  
  mynumber = Num2(8)
  mynumber.show()
  </code></pre>
  
  <p>RESULT: <code>8</code></p>
  
  <p>This is OK. But I replace <code>Num2</code> with</p>
  
  <pre><code>class Num2(Num):
      def __init__(self,num):
          self.n2 = num*2
      def show(self):
          print self.n1,self.n2
  </code></pre>
  
  <p>RESULT: <code>Error. Num2 has no attribute "n1".</code></p>
  
  <p>In this case, how can <code>Num2</code> access <code>n1</code>?</p>