FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-150880: Clarify DirEntry.path construction semantics (GH-153218) by miss-islington · Pull Request #153220 · python/cpython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
14 changes: 10 additions & 4 deletions Doc/library/os.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2980,10 +2980,16 @@ features:

.. attribute:: path

The entry's full path name: equivalent to ``os.path.join(scandir_path,
entry.name)`` where *scandir_path* is the :func:`scandir` *path*
argument. The path is only absolute if the :func:`scandir` *path*
argument was absolute. If the :func:`scandir` *path*
The entry's path name: equivalent to ``os.path.join(scandir_path,
entry.name)`` where *scandir_path* is the original :func:`scandir`
*path* argument. Apart from the filename, the path preserves the
original :func:`scandir` argument. If the :func:`scandir` *path*
argument was relative, the :attr:`path` attribute is also relative.
Changing the current working directory after creating the
:func:`scandir` iterator may cause later uses of :attr:`path` to resolve
differently. On some platforms, the constructed path may not be valid
if the original :func:`scandir` argument was usable for enumeration but
not for joining with the entry name. If the :func:`scandir` *path*
argument was a :ref:`file descriptor <path_fd>`, the :attr:`path`
attribute is the same as the :attr:`name` attribute.

Expand Down
Loading

Back | FazBrowse Home | New Git URL