Dict when defining not returning multi value key error

Dilu Sasidharan dilu.seven at gmail.com
Thu Jul 31 13:24:44 CEST 2014


I am wondering why the dictionary in python not returning multi value key
error when i define something like

p = {'k':"value0",'k':"value1"}

key is string immutable and sometimes shares same id.

also if the key is immutable and have different ids.


p = {'1':"value0",'1.0':"value1"}

Please reply.


*Dilu Sasidharan dilu.seven at gmail.com <dilu.seven at gmail.com>*
*+91 - 9483 6389 07*

*+91 - 9495 633 275 *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140731/59c359af/attachment.html>

More information about the Python-list mailing list