[issue44033] Adding multiple keys of the same name to a dict doesn't raise an exception

Shreyan Avigyan report at bugs.python.org
Tue May 4 13:35:45 EDT 2021


Shreyan Avigyan <shreyan.avigyan at gmail.com> added the comment:

I've read that issue but it seems that it actually was based on "Should there be a warning or error?". I actually suggest something different. I suggest that "Either raise an exception or just use the first key-value pair if the key is repeated during initialization". (By "initialization" I mean to say creating a new dict object)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44033>
_______________________________________


More information about the Python-bugs-list mailing list