-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
(📚) docs for PLW1641
known problems
doesn't make sense
#14883
Comments
The rule is
So.. if you have this: class A:
def __hash__(self):
return 1
class B(A):
def __eq__(self, other):
return False B implements What doesn't make sense about this? |
as in my OP: print(B.__hash__) # None |
source: https://docs.python.org/3/reference/datamodel.html#object.__hash__ |
Wow, so it's just when |
@KotlinIsland sorry your OP doesn't have inheritance Interesting find though! |
fail... i've updated it |
__hash__
defined in a superclass doesn't affect the semantics:The text was updated successfully, but these errors were encountered: