summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2016-06-04 21:38:43 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2016-06-04 21:38:43 (GMT)
commitd62548afede899e71e59a2a0b31f19fdf031c560 (patch)
tree11dc76fe4b5c89d93c63e8bdf4b9ec535fde6451 /Doc/library/functions.rst
parent228c636908bda8a6b20b0f6930655fbaedc4ebad (diff)
downloadcpython-d62548afede899e71e59a2a0b31f19fdf031c560.zip
cpython-d62548afede899e71e59a2a0b31f19fdf031c560.tar.gz
cpython-d62548afede899e71e59a2a0b31f19fdf031c560.tar.bz2
issue27186: add open/io.open; patch by Jelle Zijlstra
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index c3563f3..6f7ba1f 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -878,11 +878,11 @@ are always available. They are listed here in alphabetical order.
Open *file* and return a corresponding :term:`file object`. If the file
cannot be opened, an :exc:`OSError` is raised.
- *file* is either a string or bytes object giving the pathname (absolute or
- relative to the current working directory) of the file to be opened or
- an integer file descriptor of the file to be wrapped. (If a file descriptor
- is given, it is closed when the returned I/O object is closed, unless
- *closefd* is set to ``False``.)
+ *file* is either a string, bytes, or :class:`os.PathLike` object giving the
+ pathname (absolute or relative to the current working directory) of the file
+ to be opened or an integer file descriptor of the file to be wrapped. (If a
+ file descriptor is given, it is closed when the returned I/O object is
+ closed, unless *closefd* is set to ``False``.)
*mode* is an optional string that specifies the mode in which the file is
opened. It defaults to ``'r'`` which means open for reading in text mode.