title: Python inheritance and calling parent class constructor
body: <p>This is what I'm trying to do in Python: </p>
  
  <pre><code>class BaseClass:
      def __init__(self):
          print 'The base class constructor ran!'
          self.__test = 42
  
  class ChildClass(BaseClass):
  
      def __init__(self):
          print 'The child class constructor ran!'
          BaseClass.__init__(self)
  
      def doSomething(self):
          print 'Test is: ', self.__test
  
  
  test = ChildClass()
  test.doSomething()
  </code></pre>
  
  <p>Which results in: </p>
  
  <pre><code>AttributeError: ChildClass instance has no attribute '_ChildClass__test'
  </code></pre>
  
  <p>What gives? Why doesn't this work as I expect?</p>