title: When dictionary keys are identical, why does Python keep only the last key-value pair?
body: <p>Let's say I create a dictionary <code>a_dictionary</code> where two of the key-value pairs have an identical key:</p>
  
  <pre><code>In [1]: a_dictionary = {'key': 5, 'another_key': 10, 'key': 50} 
  
  In [2]: a_dictionary
  Out[2]: {'key': 50, 'another_key': 10}
  </code></pre>
  
  <p>Why does Python choose here to keep the last key-value pair instead of throwing an error (or at least raising a warning) about using identical keys?</p>
  
  <p>The way I see it, the main downside here is that you may lose data without being aware.</p>
  
  <p>(If it's relevant, I ran the code above on Python 3.6.4.)</p>