title: Python :: Attribute in superclass not available in inheriting subclass
body: <p>I'm wondering why the below fails; basically that an inheriting subclass (<strong>SubClass</strong>) doesn't appear to have access to an attribute in the superclass (<strong>SuperClass</strong>) that it inherits from.</p>
  
  <p>By the way, all three files below are in the same directory and, for completeness, I'm using Python3.</p>
  
  <p>Any ideas? I think it's something stunningly simple. Thank you!</p>
  
  <p>The super class (<strong>SuperClass</strong> in <strong>./super_class.py)</strong> ...</p>
  
  <pre><code>class SuperClass(object):
  
     def __init__(self):
        self.varSuper = 'varSuper_value'
  </code></pre>
  
  <p>The inheriting sub class (<strong>SubClass</strong> in <strong>./sub_class.py)</strong> ...</p>
  
  <pre><code>from super_class import SuperClass
  
  class SubClass(SuperClass):
  
    def __init__(self):
       super(SuperClass, self).__init__()
       self.varSub = 'varSub_value'
  </code></pre>
  
  <p>The driver/tester script <strong>(./driver.py)</strong> ...</p>
  
  <pre><code>#! /usr/bin/env python3
  
  from sub_class import SubClass
  
  print(SubClass().varSub)    # Works: "varSub_value"
  print(SubClass().varSuper)  # Excepts: I expected "varSuper_value"
  </code></pre>
  
  <p>The exception ...</p>
  
  <pre><code>user@linux$ ./driver.py
  varSub_value                                  &lt;--- GOOD
  Traceback (most recent call last):
    File "./driver.py", line 6, in &lt;module&gt;
      print(SubClass().varSuper)                &lt;--- NO GOOD
  AttributeError: 'SubClass' object has no attribute 'varSuper'
  </code></pre>