Closed
Description
I happened to be reading through the typeshed
code because of a completely unrelated issue I was tracking down, and noticed that the pow
function return type seems to be overly broad:
https://github.com/python/typeshed/blob/master/stdlib/3/builtins.pyi#L703
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y
Should that be?
def pow(x: int, y: int) -> Union[int, float]: ...
Metadata
Metadata
Assignees
Labels
No labels