Documentation
In the documentation for pathlib.Path.Walk, there is a typo in the provided example's keyword argument that should be top_down=False:
# 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 name in files:
(root / name).unlink()
for name in dirs:
(root / name).rmdir()
Documentation
In the documentation for
pathlib.Path.Walk, there is a typo in the provided example's keyword argument that should betop_down=False: