3 ms·
I think if you settle for the args being combined into a tuple you could essentially create a tagged union and the type checker should be able to refine off the
by emptysea 6y ago
I think if you settle for the args being combined into a tuple you could essentially create a tagged union and the type checker should be able to refine off the comparison.
Type would be something like:
Union[Tuple[Literal[“thing1”], TypeX], Tuple[Literal[“thing2”], TypeY]]