Andrei Kulakov <andrei....@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue45054>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to