-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
>>>a = object.__new__(type(exit))
>>>b = {}
>>>b[a]
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
b[a]
~^^^
KeyError: <exception str() failed>
The exception AttributeError
was hidden:
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
b[a]
~^^^
AttributeError: 'Quitter' object has no attribute 'name'
The exception in str() shouldn't be ignore. May because of the lack of the attribute or the wrong type that __str__
return.
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error