GH-73991: Rework pathlib.Path.rmtree() into delete()#122368
Conversation
Rename `pathlib.Path.rmtree()` to `delete()`, and add support for deleting non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `copy()` methods (which will also accept any type of file.)
AA-Turner
left a comment
There was a problem hiding this comment.
Implementation looks fine, only one question
A
Sorry, something went wrong.
|
@nineteendo I'd welcome your review on this, if you have the time and inclination. No worries if not! Thanks in advance :) |
Sorry, something went wrong.
We generally put the more primitive functions first.
AA-Turner
left a comment
There was a problem hiding this comment.
Merci beaucoup!
A
Sorry, something went wrong.
|
Thank you very much for the reviews :) |
Sorry, something went wrong.
|
Sorry for my tardiness! Do let me know if there's anything else I can usefully review A |
Sorry, something went wrong.
|
Not tardy at all I don't think! :]
Since you're offering, the next PR on the critical path here is #122369. But there's a lot going on there, so feel free to give it a miss or ask me to explain it further / break it up / whatever. Thanks again! And feel free to assign me when you next need a review of something. |
Sorry, something went wrong.
…n#122368) Rename `pathlib.Path.rmtree()` to `delete()`, and add support for deleting non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `copy()` methods (which will also accept any type of file.)
Rename
pathlib.Path.rmtree()todelete(), and add support for deleting non-directories. This simplifies the interface for users, and nicely complements the upcomingmove()andcopy()methods (which will also accept any type of file.)📚 Documentation preview 📚: https://cpython-previews--122368.org.readthedocs.build/