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 rhettinger, sfreilich
Date 2020-09-27.02:50:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601175059.08.0.210646819903.issue41114@roundup.psfhosted.org>
In-reply-to
Content
> It would be clearer if the message was something like:
> 
> TypeError: 'dict' can not be used as a set value because 
> it is an unhashable type.

IMO that doesn't help.  The trackback already shows the code where the exception occurred.  The user already knows the calling type, and the existing message tells them what type was passed in.  

Their real problem is that they still have to confront the notion of what "unhashable type" means and then need figure-out a way to fix it.  So the proposed extra information is just a distractor that doesn't get the user any closer to understanding or solving their problem.  

To get a user closer to the solution they would either need an explanation of what hashable means and/or be given a suggestion of how to fix it:

   TypeError: unhashable type: 'dict'.  Consider using an int,
   str, tuple, or frozenset.

That said, it is precarious to guess what the user intended, so it is difficult to suggest some form of "did you mean ..."
History
Date User Action Args
2020-09-27 02:50:59rhettingersetrecipients: + rhettinger, sfreilich
2020-09-27 02:50:59rhettingersetmessageid: <1601175059.08.0.210646819903.issue41114@roundup.psfhosted.org>
2020-09-27 02:50:58rhettingerlinkissue41114 messages
2020-09-27 02:50:58rhettingercreate