def f(x: Union[int, str, List, Tuple]) -> None: if isinstance(x, (str, (int, tuple))): print(x[1]) results in error: Argument 2 to "isinstance" has incompatible type ...
Asked this question on stackoverflow but I am copying here as this seems to be an untended results based on PEP 544. If a protocol is implemented with a requried ...