GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-132825: Enhance unhashable error messages for dict and set by vstinner · Pull Request #132828 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Apr 23, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: "unhashable type" is a beginner-unfriendly error message #132825

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
pythongh-132825: Change unhashable key error messages for dict and set
b23bd8d
@vstinner
vstinner requested review from brettcannon, ericsnowcurrently, markshannon, methane, ncoghlan, rhettinger and warsaw as code owners April 23, 2025 09:38
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 23, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Apr 23, 2025
"unhashable type" is a beginner-unfriendly error message #132825
Closed
@vstinner vstinner changed the title gh-132825: Change unhashable key error messages for dict and set gh-132825: Enhance unhashable error messages for dict and set Apr 23, 2025
cfbolz
cfbolz approved these changes Apr 23, 2025
View reviewed changes

@cfbolz cfbolz left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is great thanks for working on this right away, Victor! As @methane pointed out, maybe Cannot -> cannot. We don't have a style guide or anything for exception messages, so maybe it doesn't matter either.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Apr 23, 2025
@vstinner
Cannot => cannot
aff2967
@vstinner

vstinner commented Apr 23, 2025

Copy link
Copy Markdown
Member Author

maybe Cannot -> cannot

Done: I replaced "Cannot ..." with "cannot ...".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cfbolz
cfbolz approved these changes Apr 23, 2025
View reviewed changes
@rhettinger
rhettinger removed their request for review April 23, 2025 14:46
@cfbolz
cfbolz merged commit 426449d into python:main Apr 23, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 23, 2025
@vstinner
vstinner deleted the unhashable branch April 23, 2025 15:16
@matthiask

matthiask commented Apr 23, 2025

Copy link
Copy Markdown

Thanks for this improvement! One minor nit: I like wordplays but I'm not sure if the T in unhashTable has been introduced on purpose?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Apr 23, 2025

Copy link
Copy Markdown
Member Author

Thanks for this improvement! One minor nit: I like wordplays but I'm not sure if the T in unhashTable has been introduced on purpose?

It wasn't done on purpose, it's a typo :-( I wrote #132847 to fix the typo.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Feuermurmel Feuermurmel mentioned this pull request May 3, 2026
Exception notes discarded from TypeError within __hash__() #149313
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cfbolz cfbolz cfbolz approved these changes
@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner
@methane methane Awaiting requested review from methane methane is a code owner
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@vstinner @matthiask @cfbolz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.