title: Adding an attribute to a Python dictionary from the standard library
body: <p>I was wondering if you could add an attribute to a Python dictionary?</p>
  <pre><code>class myclass():
      def __init__(): 
       self.mydict = {}  # initialize a regular dict
       self.mydict.newattribute = &quot;A description of what this dictionary will hold&quot;
       &gt;&gt;&gt; AttributeError: 'dict' object has no attribute 'newattribute'
       setattr(self.mydict, &quot;attribute&quot;, &quot;A description of what this dictionary will hold&quot;
       &gt;&gt;&gt; AttributeError: 'dict' object has no attribute 'newattribute'
  </code></pre>
  <p>Is there anyway to quickly add my description attribute without having to copy the dict class and overloading the constructor. I thought it would be simple, but I guess I was wrong.</p>