]> granicus.if.org Git - python/commitdiff
closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836)
authorBernt Røskar Brenna <bernt.brenna@gmail.com>
Tue, 10 Sep 2019 12:43:58 +0000 (14:43 +0200)
committerBenjamin Peterson <benjamin@python.org>
Tue, 10 Sep 2019 12:43:58 +0000 (13:43 +0100)
Lib/os.py

index 200902528cbfe95dc01cc5d5df8b4bd0fd42026a..52d3f1d7415854e7baf7f5ac564ef4629c648449 100644 (file)
--- 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