title: How to copy a dict and modify it in one line of code
body: <p>Very often I need to create dicts that differ one from another by an item or two. Here is what I usually do:</p>
  
  <pre><code>setup1 = {'param1': val1, 
              'param2': val2,
              'param3': val3,
              'param4': val4,
              'paramN': valN}
  
  setup2 = copy.deepcopy(dict(setup1))
  setup2.update({'param1': val10, 
                     'param2': val20})
  </code></pre>
  
  <p>The fact that there is a point in the program at which <code>setup2</code> is an identical copy of <code>setup1</code> makes me nervous, as I'm afraid that at some point of the program life the two lines might get separated, which is a slippery slope towards too many bugs. </p>
  
  <p>Ideally I would like to be able to complete this action in a single line of code (something like this):</p>
  
  <pre><code>setup2 = dict(setup1).merge({'param1': val10, 
                          'param2': val20})
  </code></pre>
  
  <p>Of course, I can use semicolon to squeeze two commands into  one physical line, but this looks pretty ugly to me. Are there other options?  </p>