]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtre...
authorVictor Wheeler <vwheeler63@users.noreply.github.com>
Wed, 30 Oct 2024 18:22:58 +0000 (12:22 -0600)
committerGitHub <noreply@github.com>
Wed, 30 Oct 2024 18:22:58 +0000 (11:22 -0700)
* gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm.

Resolves #126055

* gh-126055:  Fix omitted code highlighting

Doc/library/os.rst

index 081d7a6f97b0791b7df023c29f6c8734ddf8b9e1..f9cded40c2c755698a53fe0057442046075ef9b7 100644 (file)
@@ -3675,6 +3675,7 @@ features:
               os.remove(os.path.join(root, name))
           for name in dirs:
               os.rmdir(os.path.join(root, name))
+      os.rmdir(top)
 
    .. audit-event:: os.walk top,topdown,onerror,followlinks os.walk