[Python-checkins] Fix documentation typo for pathlib.Path.walk (GH-96301)
brettcannon
webhook-mailer at python.org
Fri Aug 26 17:21:49 EDT 2022
https://github.com/python/cpython/commit/b462f143ff9592179d82680d0156eedb74705ed4
commit: b462f143ff9592179d82680d0156eedb74705ed4
branch: main
author: Ansab Gillani <56605828+ansabgillani at users.noreply.github.com>
committer: brettcannon <brett at python.org>
date: 2022-08-26T14:21:40-07:00
summary:
Fix documentation typo for pathlib.Path.walk (GH-96301)
files:
M Doc/library/pathlib.rst
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index f7d7745eef5..1375ce1aef9 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -1038,7 +1038,7 @@ call fails (for example because the path doesn't exist).
# Delete everything reachable from the directory "top".
# CAUTION: This is dangerous! For example, if top == Path('/'),
# it could delete all of your files.
- for root, dirs, files in top.walk(topdown=False):
+ for root, dirs, files in top.walk(top_down=False):
for name in files:
(root / name).unlink()
for name in dirs:
More information about the Python-checkins
mailing list