Simple question:
Python 2.6.6 (r266:84292, Aug 9 2016, 06:11:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> d = {'foo':1,'foo':2}
>>> print d
{'foo': 2}
>>> d = {'foo':2,'foo':1}
>>> print d
{'foo': 1}
So it seems that if I assign a dictionary literal with a duplicate key to a variable it is the second key/pair that is used, at least for this particular python version.
Is this behaviour guaranteed?