title: Employ separate returned variables not associated to an instance
body: <p>I am trying to inherit Python Class dict to modify its functionality. I would like it to return a self-determined value when the key is not present (i.e. override <em><strong>get</strong></em> rather than return None). I can do it using the following snippet but there is a problem:</p>
  <pre><code>class xDict(dict):
      def __init__(self, *args, **kwargs):
          super().__init__(*args, **kwargs)
          self.__dict__ = self
          self.out = 0
  
      def reap(self, qw): #instead of *dict.get()*
          if qw not in self.keys(): return self.out
          else: return self.get(qw)
          
      def modify(self, qw):
          self.out = qw
  
  l = xDict({'c':2,'x':1})
  </code></pre>
  <p>When I call <code>l</code>, it contains the the 'out' variable associated with the instance: <em>{'c': 2, 'x': 1, 'out': 0}</em></p>
  <p>I would like to avoid this being contained in the dictionary - is it possible?</p>
  <p>I also tried using a class variable solution:</p>
  <pre><code>class xDict(dict):
      #class variable
      out = 0
      
      def __init__(self, *args, **kwargs):
          super().__init__(*args, **kwargs)
          self.__dict__ = self
  
      def reap(self, qw):
          if qw not in self.keys(): return xDict.out
          else: return self.get(qw)
  
      @classmethod #class method
      def set_out(cls, x): #USE cls (equivalent to self)
          cls.out = x
  
  l1 = xDict({'c':2,'x':1})
  l2 = xDict({'r':2, 'd':2})
  </code></pre>
  <p>But here I cannot set separate return values for each instance. For, example: <code>l1.set_out(&quot;NA&quot;)</code> causes any request to l2 to also return 'NA'</p>