diff options
| author | Benjamin Peterson <benjamin@python.org> | 2014-06-16 03:52:02 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2014-06-16 03:52:02 (GMT) |
| commit | 5b521fc9de6b58707632eb0da4f871f37a525616 (patch) | |
| tree | d3a3635729ffc6e387e2ac7631ee818515723d55 /Lib/os.py | |
| parent | 8ff4dfe857e7c4089c58b4abaf065baef4d5fadb (diff) | |
| parent | e58e0c7f33c90c581c246b3bb9d803753eab987b (diff) | |
| download | cpython-5b521fc9de6b58707632eb0da4f871f37a525616.zip cpython-5b521fc9de6b58707632eb0da4f871f37a525616.tar.gz cpython-5b521fc9de6b58707632eb0da4f871f37a525616.tar.bz2 | |
merge 3.4 (#13779)
Diffstat (limited to 'Lib/os.py')
| -rw-r--r-- | Lib/os.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -312,11 +312,12 @@ def walk(top, topdown=True, onerror=None, followlinks=False): When topdown is true, the caller can modify the dirnames list in-place (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. + 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. By default errors from the os.listdir() call are ignored. If optional arg 'onerror' is specified, it should be a function; it @@ -344,6 +345,7 @@ def walk(top, topdown=True, onerror=None, followlinks=False): print("bytes in", len(files), "non-directory files") if 'CVS' in dirs: dirs.remove('CVS') # don't visit CVS directories + """ islink, join, isdir = path.islink, path.join, path.isdir |
