Author Xezlec
Recipients Xezlec, docs@python
Date 2016-12-27.21:27:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In section 5.5 on the page the requirements given for dictionary keys are not correct.

Specifically, it is claimed that only immutable objects (and tuples containing only immutable objects) may be used as keys.  This is false, as user-defined mutable objects may be used as keys.  I suggest rewording along these lines:

"Only user-defined objects and immutable built-in types may be used as keys.  Although allowed, it is bad practice to use a mutable user-defined object as a key when equality is determined in any way other than identity (the default)."
Date User Action Args
2016-12-27 21:27:05Xezlecsetrecipients: + Xezlec, docs@python
2016-12-27 21:27:05Xezlecsetmessageid: <>
2016-12-27 21:27:05Xezleclinkissue29089 messages
2016-12-27 21:27:05Xezleccreate