Skip to content

Commit

Permalink
builtins.pow: fix for negative exp
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Jan 24, 2020
1 parent 2a40d39 commit 17df032
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stdlib/2and3/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1372,12 +1372,16 @@ else:

if sys.version_info >= (3, 8):
@overload
def pow(base: int, exp: int, mod: Optional[int] = ...) -> int: ...
def pow(base: int, exp: int, mod: None = ...) -> Any: ... # returns int or float depending on whether exp is non-negative
@overload
def pow(base: int, exp: int, mod: int) -> int: ...
@overload
def pow(base: float, exp: float, mod: None = ...) -> float: ...
else:
@overload
def pow(__base: int, __exp: int, __mod: Optional[int] = ...) -> int: ...
def pow(__base: int, __exp: int, __mod: None = ...) -> Any: ... # returns int or float depending on whether exp is non-negative
@overload
def pow(__base: int, __exp: int, __mod: int) -> int: ...
@overload
def pow(__base: float, __exp: float, __mod: None = ...) -> float: ...
def quit(code: object = ...) -> NoReturn: ...
Expand Down

0 comments on commit 17df032

Please sign in to comment.