I understand that type hints are constructs during compilation, but is there a way to access them during object construction? For instance
T = typing.TypeVar("T")
class Foo(typing.Generic[T]):
pass
If someone now writes Foo[int]
, is there a way to access int
in Foo
's __init__
method?