title: Generating dictionary keys on the fly
body: <p>Working with deeply nested python dicts, I would like to be able to assign values in such a data structure like this:</p>
  
  <pre><code>  mydict[key][subkey][subkey2]="value"
  </code></pre>
  
  <p>without having to check that mydict[key] etc. are actually set to be a dict, e.g. using</p>
  
  <pre><code>  if not key in mydict: mydict[key]={}
  </code></pre>
  
  <p>The creation of subdictionaries should happen on the fly. What is the most elegant way to allow something equivalent - maybe using decorators on the standard <code>&lt;type 'dict'&gt;</code>?</p>