title: setdefault appends to each key
body: <p>I get strange results when using the setdefault method:</p>
  <pre><code>def initialize_dict(patients, default):
      d = {}
      for patient in patients:
          d.setdefault(patient, default)
      return d
  
  keys = [&quot;A&quot;, &quot;B&quot;]
  values = initialize_dict(keys, [])
  values[&quot;A&quot;].append(1)
  values
  {'A': [1], 'B': [1]}
  </code></pre>
  <p>Why does it append 1 to &quot;A&quot; and &quot;B&quot;?
  Thanks!</p>