[issue40489] INCREF/DECREFs around the rich comparison needs tests
Dong-hee Na
report at bugs.python.org
Mon May 4 09:52:43 EDT 2020
Dong-hee Na <donghee.na92 at gmail.com> added the comment:
I can crash python interpreter with few lines of code when if we remove those codes.
class S(str):
def __eq__(self, other):
d.clear()
return NotImplemented
def __hash__(self):
return hash('test')
d = {S(): 'value'}
'test' in d
----------
nosy: +corona10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40489>
_______________________________________
More information about the Python-bugs-list
mailing list