Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-15221: Doc change to os.path.is*() methods to highlight os.path.exists() #5185

Merged
merged 1 commit into from Jan 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions Doc/library/os.path.rst
Expand Up @@ -240,26 +240,29 @@ 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`.


.. 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`.


.. 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`.
Expand Down