Is there a way to get the value of an instantiated generic type at runtime? As in the following code:
T = TypeVar("T")
class Foo(Generic[T]):
def __init__(self):
print(f"instantiated type: {???}")
o1 = Foo[int]() # this should print int
o2 = Foo[bool]() # this should print bool
What should I put in the ???
to print the appropriate values?