title: Python subclass not recognizing inherited parent class
body: <p>I am struggling with my code, specifically subclasses. I have a parent class that when initialized will call its subclass to be used as an attribute, in the form of a list of objects. I have seen numerous post where a person forgets to call the <code>__init__()</code> of the parent. My issue is different in that the parent is calling the child class and I do not want to call it.  </p>
  
  <p>I am getting the following error:</p>
  
  <pre><code>NameError: name 'bundle' is not defined
  </code></pre>
  
  <p>I am confused because it is clearly defined as the parent class. Any ideas?</p>
  
  <pre><code>class bundle(object):
  """Main object to hold graphical information"""
      def __init__(self, size,nzone):
          self.size = size
          self.rows = math.sqrt(size)
          self.cols = math.sqrt(size)
          subchans = []
          r = 1
          c = 1 
          for i in range (1,self.size):
              subchans.append(bundle.subbundle(r,c,self.rows,self.cols))
              r += 1            
              if r &gt; self.rows :
                  r = 1
                  c += 1
      class subbundle(bundle):
          """ Defines geometry to represent subbundle"""
          def  __init__(self, row, col, rows,cols):
  </code></pre>