title: How do I update a dict via exclusive measures?
body: <p>what I'm trying to do is create keys that don't exist in a dict...<br>
  the best way I can think to do this is with:</p>
  
  <pre><code>&gt;&gt;&gt; d = dict( a = 'test' )
  &gt;&gt;&gt; d['a'] = d.get('a', 'default' )
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&gt;&gt;&gt; if 'a' not in d: d['a'] = 'default'
  </code></pre>
  
  <p>the problem I'm having with this is nothing more than a minor annoyance, but it's the fact I have to specify <code>'a'</code> twice.</p>
  
  <p>I'm trying not to define a function as this operation is trivial...<br>
  I just want to know, is there a better built-in way to do this??</p>