[Python-checkins] closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836)
Benjamin Peterson
webhook-mailer at python.org
Tue Sep 10 08:44:02 EDT 2019
https://github.com/python/cpython/commit/734f1202a50641eb2c4bfbcd5b75247c1dc99a8f
commit: 734f1202a50641eb2c4bfbcd5b75247c1dc99a8f
branch: master
author: Bernt Røskar Brenna <bernt.brenna at gmail.com>
committer: Benjamin Peterson <benjamin at python.org>
date: 2019-09-10T13:43:58+01:00
summary:
closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836)
files:
M Lib/os.py
diff --git a/Lib/os.py b/Lib/os.py
index 200902528cbf..52d3f1d74158 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -300,10 +300,11 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
(e.g., via del or slice assignment), and walk will only recurse into the
subdirectories whose names remain in dirnames; this can be used to prune the
search, or to impose a specific order of visiting. Modifying dirnames when
- topdown is false is ineffective, since the directories in dirnames have
- already been generated by the time dirnames itself is generated. No matter
- the value of topdown, the list of subdirectories is retrieved before the
- tuples for the directory and its subdirectories are generated.
+ topdown is false has no effect on the behavior of os.walk(), since the
+ directories in dirnames have already been generated by the time dirnames
+ itself is generated. No matter the value of topdown, the list of
+ subdirectories is retrieved before the tuples for the directory and its
+ subdirectories are generated.
By default errors from the os.scandir() call are ignored. If
optional arg 'onerror' is specified, it should be a function; it
More information about the Python-checkins
mailing list