mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
builtins: mode argument to open can be unicode (#1452)
Part of #1411 Also remove some explicit parameter defaults.
This commit is contained in:
committed by
Matthias Kramm
parent
9947c9d513
commit
f264eda4ed
@@ -750,14 +750,14 @@ def next(i: Iterator[_T]) -> _T: ...
|
||||
def next(i: Iterator[_T], default: _VT) -> Union[_T, _VT]: ...
|
||||
def oct(i: int) -> str: ... # TODO __index__
|
||||
@overload
|
||||
def open(file: str, mode: str = 'r', buffering: int = ...) -> BinaryIO: ...
|
||||
def open(file: str, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
|
||||
@overload
|
||||
def open(file: unicode, mode: str = 'r', buffering: int = ...) -> BinaryIO: ...
|
||||
def open(file: unicode, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
|
||||
@overload
|
||||
def open(file: int, mode: str = 'r', buffering: int = ...) -> BinaryIO: ...
|
||||
def open(file: int, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
|
||||
def ord(c: unicode) -> int: ...
|
||||
# This is only available after from __future__ import print_function.
|
||||
def print(*values: Any, sep: unicode = u' ', end: unicode = u'\n',
|
||||
def print(*values: Any, sep: unicode = ..., end: unicode = ...,
|
||||
file: IO[Any] = ...) -> None: ...
|
||||
@overload
|
||||
def pow(x: int, y: int) -> Any: ... # The return type can be int or float, depending on y.
|
||||
@@ -768,7 +768,7 @@ def pow(x: float, y: float) -> float: ...
|
||||
@overload
|
||||
def pow(x: float, y: float, z: float) -> float: ...
|
||||
def quit(code: int = ...) -> None: ...
|
||||
def range(x: int, y: int = 0, step: int = 1) -> List[int]: ...
|
||||
def range(x: int, y: int = ..., step: int = ...) -> List[int]: ...
|
||||
def raw_input(prompt: Any = ...) -> str: ...
|
||||
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user