Message349342
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 |
|
Date |
User |
Action |
Args |
2019-08-10 16:36:05 | rhettinger | set | recipients:
+ rhettinger, tim.peters, mark.dickinson, serhiy.storchaka |
2019-08-10 16:36:05 | rhettinger | set | messageid: <1565454965.25.0.221274181402.issue37807@roundup.psfhosted.org> |
2019-08-10 16:36:05 | rhettinger | link | issue37807 messages |
2019-08-10 16:36:05 | rhettinger | create | |
|