Skip to content

Fix return type of pow to make it more restrictive. #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/2.7/__builtin__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def ord(c: unicode) -> int: ...
def print(*values: Any, sep: unicode = u' ', end: unicode = u'\n',
file: IO[Any] = ...) -> None: ...
@overload
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y.
def pow(x: int, y: int) -> Union[int, float]: ... # The return type depends on the value of y.
@overload
def pow(x: int, y: int, z: int) -> Any: ...
@overload
Expand Down
2 changes: 1 addition & 1 deletion stdlib/3/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ def ord(c: Union[str, bytes, bytearray]) -> int: ...
# TODO: in Python 3.2, print() does not support flush
def print(*values: Any, sep: str = ' ', end: str = '\n', file: IO[str] = None, flush: bool = False) -> None: ...
@overload
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y
def pow(x: int, y: int) -> Union[int, float]: ... # The return type depends on the value of y.
@overload
def pow(x: int, y: int, z: int) -> Any: ...
@overload
Expand Down