gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm (GH-126067)
* gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm.
Resolves GH-126055
* gh-126055: Fix omitted code highlighting
(cherry picked from commit
597d814334742dde386a4d2979b9418aee6fcaba)
Co-authored-by: Victor Wheeler <vwheeler63@users.noreply.github.com>
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