Add __round__ to int and float in Python 3 (#2061)

This commit is contained in:
Semyon Proshev
2018-04-18 00:25:04 +03:00
committed by Jelle Zijlstra
parent 55a3bad0f8
commit 5223b26ec8

View File

@@ -143,6 +143,7 @@ class int:
def __neg__(self) -> int: ...
def __pos__(self) -> int: ...
def __invert__(self) -> int: ...
def __round__(self, ndigits: int = ...) -> int: ...
def __eq__(self, x: object) -> bool: ...
def __ne__(self, x: object) -> bool: ...
@@ -182,6 +183,10 @@ class float:
def __rmod__(self, x: float) -> float: ...
def __rdivmod__(self, x: float) -> Tuple[float, float]: ...
def __rpow__(self, x: float) -> float: ...
@overload
def __round__(self) -> int: ...
@overload
def __round__(self, ndigits: int) -> float: ...
def __eq__(self, x: object) -> bool: ...
def __ne__(self, x: object) -> bool: ...