title: Python: derived classes access dictionary of base class in the same memory location
body: <p>I'm wondering why a dictionary, that is defined in a base class and is accessed from derived classes, is obviously present only in one memory location. 
  A short example: </p>
  
  <pre><code>class BaseClass:
      _testdict = dict()
      _testint = 0
  
      def add_dict_entry(self):
          self._testdict["first"] = 1
  
      def increment(self):
          self._testint += 1
  
  class Class1(BaseClass):
      pass
  
  class Class2(BaseClass):
      pass
  
  object1 = Class1()
  object2 = Class2()
  
  object1.add_dict_entry()
  object1.increment()
  print(object2._testdict)
  print(object2._testint)
  </code></pre>
  
  <p>and the output is:</p>
  
  <pre><code>{'first': 1}
  0
  </code></pre>
  
  <p>Why does a call to the "add_dict_entry" of object1 affect the dictionary of object2? Using integers ("increment") the base class variable is not affected. </p>
  
  <p>Thanks a lot. </p>
  
  <p>Lorenz</p>