title: One-step initialization of defaultdict that appends to list?
body: <p>It would be convenient if a <code>defaultdict</code> could be initialized along the following lines </p>
  
  <pre><code>d = defaultdict(list, (('a', 1), ('b', 2), ('c', 3), ('d', 4), ('a', 2),
     ('b', 3)))
  </code></pre>
  
  <p>to produce</p>
  
  <pre><code>defaultdict(&lt;type 'list'&gt;, {'a': [1, 2], 'c': [3], 'b': [2, 3], 'd': [4]})
  </code></pre>
  
  <p>Instead, I get </p>
  
  <pre><code>defaultdict(&lt;type 'list'&gt;, {'a': 2, 'c': 3, 'b': 3, 'd': 4})
  </code></pre>
  
  <p>To get what I need, I end up having to do this:</p>
  
  <pre><code>d = defaultdict(list)
  for x, y in (('a', 1), ('b', 2), ('c', 3), ('d', 4), ('a', 2), ('b', 3)):
      d[x].append(y)
  </code></pre>
  
  <p>This is IMO one step more than should be necessary, am I missing something here?   </p>