Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docs for eq-without-hash #14885

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KotlinIsland
Copy link
Contributor

Summary

resolves #14883

Test Plan

used a spell checker

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dhruvmanila dhruvmanila added the documentation Improvements or additions to documentation label Dec 10, 2024
Comment on lines -14 to +17
/// method implicitly set to `None`. This will cause the class to be
/// unhashable, will in turn cause issues when using the class as a key in a
/// dictionary or a member of a set.
///
/// ## Known problems
/// Does not check for `__hash__` implementations in superclasses.
/// method implicitly set to `None`, regardless of if a super class defines
/// `__hash__`. This will cause the class to be unhashable, will in turn
/// cause issues when using the class as a key in a dictionary or a member
/// of a set.
Copy link
Member

Choose a reason for hiding this comment

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

I think we should provide an additional example below for the case where a superclass has defined a __hash__ method and still the subclass is unhashable because Python will not inherit it and provide a link to https://docs.python.org/3/reference/datamodel.html#object.__hash__.

@MichaReiser MichaReiser changed the title (📚) fix docs for eq-without-hash fix docs for eq-without-hash Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(📚) docs for PLW1641 known problems doesn't make sense
2 participants