title: How to get nested dictionary key value with .get()
body: <p>With a simple dictionary like:</p>
  <pre><code>myDict = {'key1':1, 'key2':2}
  </code></pre>
  <p>I can safely use:</p>
  <pre><code>print myDict.get('key3')
  </code></pre>
  <p>and even while 'key3' is not existent no errors will be thrown since .get() still returns None.</p>
  <p>Now how would I achieve the same simplicity with a nested keys dictionary:</p>
  <pre><code>myDict={}
  myDict['key1'] = {'attr1':1,'attr2':2}
  </code></pre>
  <p>The following will give a KeyError:</p>
  <pre><code>print myDict.get('key1')['attr3']
  </code></pre>
  <p>This will go through:</p>
  <pre><code>print myDict.get('key1').get('attr3')
  </code></pre>
  <p>but it will fail with adn AttributeError: 'NoneType' object has no attribute 'get':</p>
  <pre><code>print myDict.get('key3').get('attr1')
  </code></pre>