Raymond Hettinger <[email protected]> added the comment:
We think can clarify that those docs describe int.__hash__, float.__hash__, and
complex.__hash__.
The builtin hash() function can and does make transformations on the result
from the __dunder__ method:
>>> class A:
def __hash__(self):
return 123423412341234123412341234
>>> hash(A())
1656462513496965462
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37807>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com