[issue32899] Not documented: key in dict test may raise TypeError

INADA Naoki report at bugs.python.org
Thu Feb 22 02:10:44 EST 2018


INADA Naoki <songofacandy at gmail.com> added the comment:

We have it already:

https://docs.python.org/3/library/stdtypes.html#mapping-types-dict

> A dictionary’s keys are almost arbitrary values. Values that are not hashable, that is, values containing lists, dictionaries or other mutable types (that are compared by value rather than by object identity) may not be used as keys.

----------

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


More information about the Python-bugs-list mailing list