Message392918
Adding multiple keys of the same name to a dict should raise an exception but instead causes a different behavior. For example consider this code,
>>> d = {"x" : "First value", "x" : "Second value", "y" : "Third value"}
One would expect a error because there two keys with the same name or that Python will add "x" : "First value" and will skip "x" : "Second value". But the result is opposite,
>>> d
{'x': 'Second value', 'y': 'Third value'}
Is this a bug or is this an intended behavior? (I may have missed out information related to this in the documentation. Kindly correct me if that's the case.) |
|
Date |
User |
Action |
Args |
2021-05-04 16:51:35 | shreyanavigyan | set | recipients:
+ shreyanavigyan |
2021-05-04 16:51:35 | shreyanavigyan | set | messageid: <1620147095.86.0.59311867828.issue44033@roundup.psfhosted.org> |
2021-05-04 16:51:35 | shreyanavigyan | link | issue44033 messages |
2021-05-04 16:51:35 | shreyanavigyan | create | |
|