diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-06-16 03:51:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-06-16 03:51:12 (GMT) |
commit | e58e0c7f33c90c581c246b3bb9d803753eab987b (patch) | |
tree | b8e35eb1a4ba0ffd83203c0b048b546b21c65508 /Doc | |
parent | 9204e091780d13b00ec989068abc8efe06c6af7a (diff) | |
download | cpython-e58e0c7f33c90c581c246b3bb9d803753eab987b.zip cpython-e58e0c7f33c90c581c246b3bb9d803753eab987b.tar.gz cpython-e58e0c7f33c90c581c246b3bb9d803753eab987b.tar.bz2 |
clarify when the list of subdirectories is read (closes #13779)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/os.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 20f3b25..ce19fd26 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2228,9 +2228,11 @@ features: If optional argument *topdown* is ``True`` or not specified, the triple for a directory is generated before the triples for any of its subdirectories - (directories are generated top-down). If *topdown* is ``False``, the triple for a - directory is generated after the triples for all of its subdirectories - (directories are generated bottom-up). + (directories are generated top-down). If *topdown* is ``False``, the triple + for a directory is generated after the triples for all of its subdirectories + (directories are generated bottom-up). No matter the value of *topdown*, the + list of subdirectories is retrieved before the tuples for the directory and + its subdirectories are generated. When *topdown* is ``True``, the caller can modify the *dirnames* list in-place (perhaps using :keyword:`del` or slice assignment), and :func:`walk` will only |