Open
Description
It's my understanding that overloads are processed in order. I.e. given the following overloads:
@overload
def foo(x: int) -> None: ...
@overload
def foo(x: int | str) -> None: ...
@overload
def foo(x: str) -> None: ...
When called with an int
, the first overload is matched, when called with a str
, the second is matched. The third is never matched. (Not going into what happens when called with int | str
.) Currently, this behavior is not mentioned in the spec.