summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2018-01-15 04:57:51 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2018-01-15 04:57:51 (GMT)
commitb3dd18d4035803b50c65a434955966d1b3b1f363 (patch)
tree87169b8fe96d622c874a9737e80cff7e7a4f8abf /Doc
parent3329992e31bd0494a7d7312853f7ffd054737e27 (diff)
downloadcpython-b3dd18d4035803b50c65a434955966d1b3b1f363.zip
cpython-b3dd18d4035803b50c65a434955966d1b3b1f363.tar.gz
cpython-b3dd18d4035803b50c65a434955966d1b3b1f363.tar.bz2
bpo-15221: Update os.path.is*() documentation (GH-5185)
`os.path.is*()` can return False if the file can't be accessed. The behaviour is documented in details in `os.path.exists()`. Link to `os.path.exists()` from `os.path.is*()`.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/os.path.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 06d4ece..36bb21c 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -240,8 +240,9 @@ the :mod:`glob` module.)
.. function:: isfile(path)
- Return ``True`` if *path* is an existing regular file. This follows symbolic
- links, so both :func:`islink` and :func:`isfile` can be true for the same path.
+ Return ``True`` if *path* is an :func:`existing <exists>` regular file.
+ This follows symbolic links, so both :func:`islink` and :func:`isfile` can
+ be true for the same path.
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
@@ -249,8 +250,9 @@ the :mod:`glob` module.)
.. function:: isdir(path)
- Return ``True`` if *path* is an existing directory. This follows symbolic
- links, so both :func:`islink` and :func:`isdir` can be true for the same path.
+ Return ``True`` if *path* is an :func:`existing <exists>` directory. This
+ follows symbolic links, so both :func:`islink` and :func:`isdir` can be true
+ for the same path.
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.
@@ -258,8 +260,9 @@ the :mod:`glob` module.)
.. function:: islink(path)
- Return ``True`` if *path* refers to a directory entry that is a symbolic link.
- Always ``False`` if symbolic links are not supported by the Python runtime.
+ Return ``True`` if *path* refers to an :func:`existing <exists>` directory
+ entry that is a symbolic link. Always ``False`` if symbolic links are not
+ supported by the Python runtime.
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.