summaryrefslogtreecommitdiff
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-04-18 14:47:50 +0000
committerBenjamin Peterson <benjamin@python.org>2009-04-18 14:47:50 +0000
commit97023cab689e8aba87c9284ac068b0452321cc86 (patch)
tree21025b4edde2a726fe4fa7d8bf66edb474b979e7 /Lib/_pyio.py
parent388737af628cb59cb50b8ac67644279b87cc8489 (diff)
downloadcpython-97023cab689e8aba87c9284ac068b0452321cc86.tar.gz
add annotations to open()
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r--Lib/_pyio.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 3fd1afedde..0ef6822044 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.