Allow passing complex to complex constructor (#5609)

This commit is contained in:
Ethan Smith
2021-06-09 13:58:22 -07:00
committed by GitHub
parent d143a5d04b
commit cb76f32826

View File

@@ -299,7 +299,7 @@ class complex:
@overload
def __new__(cls: Type[_T], real: float = ..., imag: float = ...) -> _T: ...
@overload
def __new__(cls: Type[_T], real: Union[str, SupportsComplex, SupportsIndex]) -> _T: ...
def __new__(cls: Type[_T], real: Union[str, SupportsComplex, SupportsIndex, complex]) -> _T: ...
@property
def real(self) -> float: ...
@property