-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Closed
Copy link
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
from typing import Any
class Foo(Any): ...
print(repr(Foo)) # => typing.Any not <class '__main__.Foo'> as I would expect
I believe
Lines 495 to 496 in e8259e0
def __repr__(self): | |
return "typing.Any" |
def __repr__(self):
if self is Any:
return "typing.Any"
return super().__repr__()
Your environment
- CPython versions tested on: 3.11 and 3.12
- Operating system and architecture: macOS
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error