Add attributes to int and float (#2529)

* real, imag, conjugate all exist on int and float
* numerator, denominator exists on int
This commit is contained in:
Dave Halter
2018-10-23 00:44:36 +02:00
committed by Sebastian Rittau
parent f07bdf418b
commit a437fcc886
3 changed files with 48 additions and 0 deletions

View File

@@ -95,6 +95,16 @@ class int:
@overload
def __init__(self, x: Union[str, unicode, bytearray], base: int = ...) -> None: ...
@property
def real(self) -> int: ...
@property
def imag(self) -> int: ...
@property
def numerator(self) -> int: ...
@property
def denominator(self) -> int: ...
def conjugate(self) -> int: ...
def bit_length(self) -> int: ...
def __add__(self, x: int) -> int: ...
@@ -152,6 +162,12 @@ class float:
@classmethod
def fromhex(cls, s: str) -> float: ...
@property
def real(self) -> float: ...
@property
def imag(self) -> float: ...
def conjugate(self) -> float: ...
def __add__(self, x: float) -> float: ...
def __sub__(self, x: float) -> float: ...
def __mul__(self, x: float) -> float: ...