summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-09-06 22:55:02 (GMT)
committerBrett Cannon <brett@python.org>2016-09-06 22:55:02 (GMT)
commit6fa7aada9bd3616e0beeb266e818497b2ec1c859 (patch)
tree6bf852c548af528abf90a365799f97a72faf18f8 /Doc/library/functions.rst
parentec6ce879c7d55d3905240a855444ac83e08c6583 (diff)
downloadcpython-6fa7aada9bd3616e0beeb266e818497b2ec1c859.zip
cpython-6fa7aada9bd3616e0beeb266e818497b2ec1c859.tar.gz
cpython-6fa7aada9bd3616e0beeb266e818497b2ec1c859.tar.bz2
Issue #26027, #27524: Document the support for path-like objects in os and os.path.
This completes PEP 519.
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 d621e87..3e2fb72 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, 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``.)
+ *file* is a :term:`path-like 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.