Created
October 31, 2026 17:58
-
-
Save mypy-play/90e60c091d32c782e5d113ae387ddf7e to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person(): | |
| def __init__(self, name: str, age: int, characteristics: type): | |
| self.name = name | |
| self.age = age | |
| self.characteristics = characteristics | |
| def foo(person: Person) -> None: | |
| reveal_type(person.characteristics) # N: Revealed type is "builtins.type" | |
| class Sub(person.characteristics): pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment