diff options
author | Bernt Røskar Brenna <bernt.brenna@gmail.com> | 2019-09-10 12:43:58 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2019-09-10 12:43:58 (GMT) |
commit | 734f1202a50641eb2c4bfbcd5b75247c1dc99a8f (patch) | |
tree | 8fb76e25ce79f35f4ace7ab414eba886368b507f /Lib/os.py | |
parent | 9008be303a89bfab8c3314c6a42330b5523adc8b (diff) | |
download | cpython-734f1202a50641eb2c4bfbcd5b75247c1dc99a8f.zip cpython-734f1202a50641eb2c4bfbcd5b75247c1dc99a8f.tar.gz cpython-734f1202a50641eb2c4bfbcd5b75247c1dc99a8f.tar.bz2 |
closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836)
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 |