-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
GH-73991: Rework pathlib.Path.copytree()
into copy()
#122369
Conversation
Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.) Rename `pathlib.Path.copytree()` to `copy()`, and add support for copying non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `delete()` methods (which will also accept any type of file.)
Making the old |
Hey @nineteendo, could you review this please, if you're up for it? Thanks in advance! |
Co-authored-by: Adam Turner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Danke!
A
Thank you for the review, very helpful! |
…n#122369) Rename `pathlib.Path.copy()` to `_copy_file()` (i.e. make it private.) Rename `pathlib.Path.copytree()` to `copy()`, and add support for copying non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `delete()` methods (which will also accept any type of file.) Co-authored-by: Adam Turner <[email protected]>
Rename
pathlib.Path.copy()
to_copy_file()
(i.e. make it private.)Rename
pathlib.Path.copytree()
tocopy()
, and add support for copying non-directories. This simplifies the interface for users, and nicely complements the upcomingmove()
anddelete()
methods (which will also accept any type of file.)📚 Documentation preview 📚: https://cpython-previews--122369.org.readthedocs.build/