Dong-hee Na <[email protected]> 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 <[email protected]>
<https://bugs.python.org/issue40489>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com