a way to get the type of a variable #915
Labels
resolution: duplicate
The idea/problem was already reported
topic: feature
Discussions about new features for Python's type annotations
in my use case if have a class with several generics, i want a convenient way to get the type of an instance, but it doesn't seem to be possible in any type checkers
mypy errors:
the alternative is to duplicate the types (which is annoying if the type annotation is large) or create a type alias, which is a pain
in typescript you can use
typeof
PS: i tried
baz: reveal_type(foo) = foo
, but no luckThe text was updated successfully, but these errors were encountered: