
Sept. 2, 2020
8:12 p.m.
E.g, why would this: def foo(x: Union[str, int]) -> int: x = 5 return x Behave differently than: def foo(x: Union[str, int]) -> int: if isinstance(x, int): return x return 5 If both are considered narrowing?