mirror of
https://github.com/python/cpython.git
synced 2024-12-18 22:34:08 +08:00
Fix documentation typo for pathlib.Path.walk (GH-96301)
This commit is contained in:
parent
c3d591fd06
commit
b462f143ff
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user