diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-09-10 13:21:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-10 13:21:57 (GMT) |
commit | c43f26eca35f22707a52fb8f3fbfc9340639b58d (patch) | |
tree | 6e2d61c6c52e6217a8e59079183bab3a693b6569 /Lib/os.py | |
parent | c3008dd480d645678409273eecbfd24bbc9669d7 (diff) | |
download | cpython-c43f26eca35f22707a52fb8f3fbfc9340639b58d.zip cpython-c43f26eca35f22707a52fb8f3fbfc9340639b58d.tar.gz cpython-c43f26eca35f22707a52fb8f3fbfc9340639b58d.tar.bz2 |
closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836)
(cherry picked from commit 734f1202a50641eb2c4bfbcd5b75247c1dc99a8f)
Co-authored-by: Bernt Røskar Brenna <bernt.brenna@gmail.com>
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |