Improve csv module and float() signature (#1418)

* DictReader should not be abstract. Reformat long lines.
* Make restval optional for DictWriter.__init__.
* The arg to reader() is *Iterable*, not *Iterator*.
* Improve signature of float() (use Union instead of overload).
This commit is contained in:
Guido van Rossum
2017-06-20 13:04:10 -07:00
committed by Matthias Kramm
parent 945527dbc0
commit 86070643ac
3 changed files with 33 additions and 16 deletions

View File

@@ -144,14 +144,7 @@ class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
def __nonzero__(self) -> bool: ...
class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
@overload
def __init__(self) -> None: ...
@overload
def __init__(self, x: SupportsFloat) -> None: ...
@overload
def __init__(self, x: unicode) -> None: ...
@overload
def __init__(self, x: bytearray) -> None: ...
def __init__(self, x: Union[SupportsFloat, str, unicode, bytearray] = ...) -> None: ...
def as_integer_ratio(self) -> Tuple[int, int]: ...
def hex(self) -> str: ...
def is_integer(self) -> bool: ...