[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

Rémi Lapeyre report at bugs.python.org
Mon Mar 11 11:29:41 EDT 2019


Rémi Lapeyre <remi.lapeyre at henki.fr> added the comment:

Guido van Rossum said in https://mail.python.org/pipermail/python-ideas/2019-March/055726.html: "this was an explicit design
decision that I made nearly 30 years ago".

I think the best way to avoid silently accepting such values would be to use @gregory.p.smith to use a function call to create the dictionary since duplicate keyword arguments raise an exception there.

I suggest to close this bug report since it works as expected.

----------
nosy: +remi.lapeyre
versions: +Python 3.7, Python 3.8 -Python 3.4

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


More information about the Python-bugs-list mailing list