[issue45054] json module should issue warning about duplicate keys

Andrei Kulakov report at bugs.python.org
Thu Nov 11 20:06:23 EST 2021


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

Another good option would be to use typed dict like `mydict : dict[int,str] = {}`; and use typed values when populating the dict; this way a type checker will warn you of inconsistent key types.

----------

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


More information about the Python-bugs-list mailing list