-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os.walk() example of an implementation of shutil.rmtree() is incomplete #126055
Comments
PR is welcomed! |
vwheeler63
added a commit
to vwheeler63/cpython
that referenced
this issue
Oct 28, 2024
…fulfill `shutil.rmtree` algorithm. Resolves python#126055
Wow! I am honored! Thank you for the invite! I didn't know it was open for contribution! Fix submitted in PR #126067. |
vwheeler63
added a commit
to vwheeler63/cpython
that referenced
this issue
Oct 28, 2024
Anyone is free to contribute whether it is by opening issues or addressing them in a PR (or reviewing them)! You should just read the https://devguide.python.org/ and the CONTRIBUTING.rst file in the repository if you want to submit a PR in general! |
willingc
pushed a commit
that referenced
this issue
Oct 30, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 30, 2024
…fulfill `shutil.rmtree` algorithm (pythonGH-126067) * pythongh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm. Resolves pythonGH-126055 * pythongh-126055: Fix omitted code highlighting (cherry picked from commit 597d814) Co-authored-by: Victor Wheeler <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Oct 30, 2024
…fulfill `shutil.rmtree` algorithm (pythonGH-126067) * pythongh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm. Resolves pythonGH-126055 * pythongh-126055: Fix omitted code highlighting (cherry picked from commit 597d814) Co-authored-by: Victor Wheeler <[email protected]>
willingc
pushed a commit
that referenced
this issue
Oct 30, 2024
… fulfill `shutil.rmtree` algorithm (GH-126067) (GH-126200) 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 597d814) Co-authored-by: Victor Wheeler <[email protected]>
willingc
pushed a commit
that referenced
this issue
Oct 30, 2024
… fulfill `shutil.rmtree` algorithm (GH-126067) (GH-126199) 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 597d814) Co-authored-by: Victor Wheeler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation
In this section:
https://docs.python.org/3.9/library/os.html?highlight=os%20walk
there is a code example at the bottom that claims to be "a simple implementation of
shutil.rmtree()
". However it is incomplete. Reason:shutil.rmtree()
also removes the passed directory whereas the code shown will not. To make it complete, add this line at the end of it after the top (highest)for
loop:That will make the whole code example look like this:
Linked PRs
shutil.rmtree
algorithm #126067shutil.rmtree
algorithm (GH-126067) #126199shutil.rmtree
algorithm (GH-126067) #126200The text was updated successfully, but these errors were encountered: