Skip to content

Commit f264eda

Browse files
JelleZijlstramatthiaskramm
authored andcommitted
builtins: mode argument to open can be unicode (#1452)
Part of #1411 Also remove some explicit parameter defaults.
1 parent 9947c9d commit f264eda

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/2/__builtin__.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -750,14 +750,14 @@ def next(i: Iterator[_T]) -> _T: ...
750750
def next(i: Iterator[_T], default: _VT) -> Union[_T, _VT]: ...
751751
def oct(i: int) -> str: ... # TODO __index__
752752
@overload
753-
def open(file: str, mode: str = 'r', buffering: int = ...) -> BinaryIO: ...
753+
def open(file: str, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
754754
@overload
755-
def open(file: unicode, mode: str = 'r', buffering: int = ...) -> BinaryIO: ...
755+
def open(file: unicode, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
756756
@overload
757-
def open(file: int, mode: str = 'r', buffering: int = ...) -> BinaryIO: ...
757+
def open(file: int, mode: unicode = ..., buffering: int = ...) -> BinaryIO: ...
758758
def ord(c: unicode) -> int: ...
759759
# This is only available after from __future__ import print_function.
760-
def print(*values: Any, sep: unicode = u' ', end: unicode = u'\n',
760+
def print(*values: Any, sep: unicode = ..., end: unicode = ...,
761761
file: IO[Any] = ...) -> None: ...
762762
@overload
763763
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: ...
768768
@overload
769769
def pow(x: float, y: float, z: float) -> float: ...
770770
def quit(code: int = ...) -> None: ...
771-
def range(x: int, y: int = 0, step: int = 1) -> List[int]: ...
771+
def range(x: int, y: int = ..., step: int = ...) -> List[int]: ...
772772
def raw_input(prompt: Any = ...) -> str: ...
773773

774774
@overload

0 commit comments

Comments
 (0)