◐ Shell
clean mode source ↗

GH-73991: Rework `pathlib.Path.rmtree()` into `delete()` by barneygale · Pull Request #122368 · python/cpython

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

AA-Turner

nineteendo

We generally put the more primitive functions first.

AA-Turner

blhsing pushed a commit to blhsing/cpython that referenced this pull request

Aug 22, 2024
…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.)