Message403108
That's a good idea, Raymond.
>>> [x.__hash__ is None for x in (list, dict, set, frozenset)]
[True, True, True, False]
I don't think this change would cause any backward compatibility issues, except it would now allow a default of something bad like:
>>> class BadList(list):
... def __hash__(self): return 0
...
>>> isinstance(BadList(), list), BadList.__hash__ is None
(True, False)
I can't say I care too much about now allowing things that didn't used to be allowed, especially if they're poorly designed like BadList.
I'll put together a PR. |
|
Date |
User |
Action |
Args |
2021-10-03 19:16:57 | eric.smith | set | recipients:
+ eric.smith, rhettinger, CCLDArjun, gianni |
2021-10-03 19:16:57 | eric.smith | set | messageid: <1633288617.33.0.706256082958.issue44674@roundup.psfhosted.org> |
2021-10-03 19:16:57 | eric.smith | link | issue44674 messages |
2021-10-03 19:16:57 | eric.smith | create | |
|