Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Further explain 'rest'.
  • Loading branch information
barneygale committed Apr 1, 2024
commit 77712d2fccd83f0f748ea76c77ddd2a8005c7fb5
5 changes: 4 additions & 1 deletion Lib/posixpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,10 @@ def realpath(filename, *, strict=False):
pardir = '..'
getcwd = os.getcwd

# The stack of unresolved path parts.
# The stack of unresolved path parts. When popped, a special value of None
# indicates that a symlink target has been resolved, and that the original
# symlink path can be retrieved by popping again. The [::-1] slice is a
# very fast way of spelling list(reversed(...)).
rest = filename.split(sep)[::-1]
Comment thread
barneygale marked this conversation as resolved.
Comment thread
barneygale marked this conversation as resolved.

# The resolved path, which is absolute throughout this function.
Expand Down