How to pass generic through type alias?
a: typing.Tuple[int, int, int] = (1, 1, 1)
a: typing.Tuple[int, int] = (1, 1)
We can customize the number of generics. However:
T = typing.Tuple
a: T[int, int, int] = (1, 1, 1)
This will not work, unless:
T = typing.Tuple[int, int, int]
a: T[int, int, int] = (1, 1, 1)
This will not work too
T = typing.Tuple[ int , ... ]
a: T[int, int, int] = (1, 1, 1)
But my goal is:
T = typing.Tuple
a: T[int, int, int] = (1, 1, 1)
a: T[int, int] = (1, 1)
able to customize generic like typing.Tuple. How can I do it?