summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-04-18 14:47:50 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-04-18 14:47:50 (GMT)
commit9990e8c264226f2b6b4883c28ced6437ce4d2b49 (patch)
tree4016db830c06231afe411b1a4b6f01bd3e31f74d /Lib
parent67d28f774dedd814e834f76008a0502becadea6b (diff)
downloadcpython-9990e8c264226f2b6b4883c28ced6437ce4d2b49.zip
cpython-9990e8c264226f2b6b4883c28ced6437ce4d2b49.tar.gz
cpython-9990e8c264226f2b6b4883c28ced6437ce4d2b49.tar.bz2
add annotations to open()
Diffstat (limited to 'Lib')
-rw-r--r--Lib/_pyio.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 3fd1afe..0ef6822 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -35,8 +35,9 @@ class BlockingIOError(IOError):
self.characters_written = characters_written
-def open(file, mode="r", buffering=None, encoding=None, errors=None,
- newline=None, closefd=True):
+def open(file: (str, bytes), mode: str = "r", buffering: int = None,
+ encoding: str = None, errors: str = None,
+ newline: str = None, closefd: bool = True) -> "IOBase":
r"""Open file and return a stream. Raise IOError upon failure.