diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 6f3e1f1cf..73c7cdf03 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -703,8 +703,15 @@ def next(i: Iterator[_T]) -> _T: ... @overload def next(i: Iterator[_T], default: _T) -> _T: ... def oct(i: int) -> str: ... # TODO __index__ -def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: str = None, - errors: str = None, newline: str = None, closefd: bool = ...) -> IO[Any]: ... + +if sys.version_info >= (3, 6): + from pathlib import Path + def open(file: Union[str, bytes, int, Path], mode: str = 'r', buffering: int = -1, encoding: str = None, + errors: str = None, newline: str = None, closefd: bool = ...) -> IO[Any]: ... +else: + def open(file: Union[str, bytes, int], mode: str = 'r', buffering: int = -1, encoding: str = None, + errors: str = None, newline: str = None, closefd: bool = ...) -> IO[Any]: ... + def ord(c: Union[str, bytes, bytearray]) -> int: ... # TODO: in Python 3.2, print() does not support flush def print(*values: Any, sep: str = ' ', end: str = '\n', file: IO[str] = None, flush: bool = False) -> None: ...