title: Storing Python dictionary entries in the order they are pushed
body: <p>A Python dictionary is stored in no particular order (mappings have no order), e.g.</p>
  
  <pre><code>&gt;&gt;&gt; myDict = {'first':'uno','second':'dos','third':'tres'}
  myDict = {'first':'uno','second':'dos','third':'tres'}
  &gt;&gt;&gt; myDict
  myDict
  {'second': 'dos', 'third': 'tres', 'first': 'uno'}
  </code></pre>
  
  <p>While it is possible to retrieve a sorted list or tuple from a dictionary, I wonder if it is possible to make a dictionary store the items in the order they are passed to it, in the previous example this would mean having the internal ordering as <code>{'first':'uno','second':'dos','third':'tres'}</code> and no different.</p>
  
  <p>I need this because I am using the dictionary to store the values as I read them from a configuration file; once read and processed (the values are altered), they have to be written to a new configuration file in the same order as they were read (this order is not alphabetical nor numerical).</p>
  
  <p>Any thoughts?</p>
  
  <p>Please notice that I am not looking for secondary ways to retrieve the order (like lists), but of ways to make a dictionary be ordered in itself (as it will be in upcoming versions of Python).</p>