◐ Shell
reader mode source ↗
Skip to content

gh-77753: Add hash examples for set/dict#92549

Closed
slateny wants to merge 1 commit into
python:mainfrom
slateny:s/stdtypes
Closed

gh-77753: Add hash examples for set/dict#92549
slateny wants to merge 1 commit into
python:mainfrom
slateny:s/stdtypes

Conversation

@slateny

@slateny slateny commented May 9, 2022

Copy link
Copy Markdown
Contributor

@rhettinger

Copy link
Copy Markdown
Contributor

Besides making two flat-out incorrect statements, I also don't think this is very useful.

The examples are cute but aren't relevant to most users of dicts and sets. Also, it isn't the sets or dicts themselves that give rise to these examples; instead, it is that numbers were intentionally designed to support cross-type equality comparisons and to follow the rule that equal values should have the same hashes. This is documented elsewhere.

Thanks for the suggestion, but I'm marking it is closed as a low quality edit.

@rhettinger rhettinger closed this May 9, 2022
@slateny

slateny commented May 10, 2022

Copy link
Copy Markdown
Contributor Author

@rhettinger I understand that the examples on hashing isn't as useful, but does the dict example about same keys but different values not warrant at least something? There seems to be twoish open issues on this, and I don't think the behavior's exactly intuitive. If it is this behavior that's documented somewhere, then I reckon that some sort of link or reference would help.

When you mark it closed due to low quality, is it due to examples not thorough enough, wording too short, or something else? I would like to improve the docs so knowing what exactly can be changed other than the incorrectness would be helpful to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants