builtins,numbers: harmonize float.__round__ and Real.__round__ (#3193)

See:
https://docs.python.org/3/reference/datamodel.html#object.__round__
https://docs.python.org/3/library/functions.html#round
This commit is contained in:
Ran Benita
2019-08-17 17:23:04 +03:00
committed by Jelle Zijlstra
parent c0625d3280
commit c7417e8b3f
3 changed files with 8 additions and 8 deletions

View File

@@ -244,9 +244,7 @@ class float:
def __trunc__(self) -> int: ...
if sys.version_info >= (3,):
@overload
def __round__(self) -> int: ...
@overload
def __round__(self, ndigits: None) -> int: ...
def __round__(self, ndigits: None = ...) -> int: ...
@overload
def __round__(self, ndigits: int) -> float: ...