From c62245c13c537a1ae415f3faa75acd1c9ec2be1a Mon Sep 17 00:00:00 2001 From: chouetz Date: Fri, 26 Aug 2022 15:36:50 +0200 Subject: [PATCH] Update pathlib.rst #96279 Documentation typo for pathlib.Path.walk in Python 3.12 #96279 --- Doc/library/pathlib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index f7d7745eef52e7..1375ce1aef953a 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: