Closed

Description
I tried this for a generic NamedTuple:
S = TypeVar("S")
T = TypeVar("T")
class Pair(Generic[S, T],
NamedTuple("Pair",[
('fst', S),
('second', T)])):
def show(self):
print(self.fst, self.second)
p = Pair("ab", 22) # type: Pair[str, int]
Mypy raised an exception: RuntimeError: TypeVarType is already analysed
.
Related question: is this the right way to define a generic NamedTuple?
Thanks!