]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix documentation typo for pathlib.Path.walk (GH-96301)
authorAnsab Gillani <56605828+ansabgillani@users.noreply.github.com>
Fri, 26 Aug 2022 21:21:40 +0000 (02:21 +0500)
committerGitHub <noreply@github.com>
Fri, 26 Aug 2022 21:21:40 +0000 (14:21 -0700)
Doc/library/pathlib.rst

index f7d7745eef52e7c1bdd198d9fcd1c0d1b46c6290..1375ce1aef953a5468d8cd4939f56eb0d40b28d9 100644 (file)
@@ -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: