title: How to use a dot "." to access members of dictionary?
body: <p>How do I make Python dictionary members accessible via a dot "."?</p>
  
  <p>For example, instead of writing <code>mydict['val']</code>, I'd like to write <code>mydict.val</code>.</p>
  
  <p>Also I'd like to access nested dicts this way. For example</p>
  
  <pre><code>mydict.mydict2.val 
  </code></pre>
  
  <p>would refer to </p>
  
  <pre><code>mydict = { 'mydict2': { 'val': ... } }
  </code></pre>