title: Python OrderedDict iteration
body: <p>Why does my python OrderedDict get initialized 'out of order'?</p>
  
  <p>The solution here is less intriguing than the explanation.   There's something here I just don't get, and perhaps an expanation would help others as well as me.</p>
  
  <pre><code>&gt;&gt;&gt; from collections import OrderedDict
  
  &gt;&gt;&gt; spam = OrderedDict(s = (1, 2), p = (3, 4), a = (5, 6), m = (7, 8))
  
  &gt;&gt;&gt; spam
  OrderedDict([('a', (5, 6)), ('p', (3, 4)), ('s', (1, 2)), ('m', (7, 8))])
  
  &gt;&gt;&gt; for key in spam.keys():
  ...    print key    
  ...
  #  this is 'ordered' but not the order I wanted....
  a
  p
  s
  m
  
  # I was expecting (and wanting):
  s
  p
  a
  m
  </code></pre>