This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients iritkatriel, rhettinger, sfreilich
Date 2020-09-28.04:22:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I've noticed that Python beginners tend to find this really confusing.

No minor tweak to the exception message will make this go away.  For understanding to occur, the only way to forward is to learn a bit about hashability.  That is a step that every beginner must take.

Fortunately, the term "hashable" is listed in the glossary.  Also the error message itself is easily Googled:

I suggest that you take this to the python-ideas list.  While there is a valid concern that a new user may not understand the error message (this is unfortunately true for many our error messages), the proposals don't actually improve the situation.

The first proposal adds hard-to-implement context information that still doesn't tell a user what the issue is.  The second proposal repeats information that is already being shown.  Neither proposal explains what is meant by unhashable type, why it matters, what would be an allowable hashable type, or how to fix the problem (which is what the user really wants to know).

After a discussion on python-ideas, if a better proposal is found, feel free to reopen this issue.
Date User Action Args
2020-09-28 04:22:45rhettingersetrecipients: + rhettinger, sfreilich, iritkatriel
2020-09-28 04:22:45rhettingersetmessageid: <>
2020-09-28 04:22:45rhettingerlinkissue41114 messages
2020-09-28 04:22:44rhettingercreate