Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c42b931

Browse filesBrowse files
slatenympage
authored andcommitted
pythongh-57179: Add note on symlinks for os.walk (python#94799)
1 parent 6444029 commit c42b931
Copy full SHA for c42b931

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed

‎Doc/library/os.rst

Copy file name to clipboardExpand all lines: Doc/library/os.rst
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3222,7 +3222,8 @@ features:
32223222
filenames)``.
32233223

32243224
*dirpath* is a string, the path to the directory. *dirnames* is a list of the
3225-
names of the subdirectories in *dirpath* (excluding ``'.'`` and ``'..'``).
3225+
names of the subdirectories in *dirpath* (including symlinks to directories,
3226+
and excluding ``'.'`` and ``'..'``).
32263227
*filenames* is a list of the names of the non-directory files in *dirpath*.
32273228
Note that the names in the lists contain no path components. To get a full path
32283229
(which begins with *top*) to a file or directory in *dirpath*, do

‎Lib/os.py

Copy file name to clipboardExpand all lines: Lib/os.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
288288
dirpath, dirnames, filenames
289289
290290
dirpath is a string, the path to the directory. dirnames is a list of
291-
the names of the subdirectories in dirpath (excluding '.' and '..').
291+
the names of the subdirectories in dirpath (including symlinks to directories,
292+
and excluding '.' and '..').
292293
filenames is a list of the names of the non-directory files in dirpath.
293294
Note that the names in the lists are just names, with no path components.
294295
To get a full path (which begins with top) to a file or directory in

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.