> On 18 Oct 2022, at 21:59, Chris Angelico <ros...@gmail.com> wrote:
> 
> On Wed, 19 Oct 2022 at 06:50, Todd <toddr...@gmail.com> wrote:
>> 
>> Currently, pathlib supports pretty much all common filesystem operations. 
>> You can create, move, and delete both files and directories. One big 
>> omission is copying. You need shutil for that.
>> 
>> Whatever the original intent might have been behind pathlib, it is now 
>> effectively the standard tool for filesystem operations. As such, excluding 
>> copying alone from basic operations creates an unnecessary hurdle for users. 
>> It also increases the difficulty of doing such operations since there is no 
>> hint within the pathlib documentation on how to copy, new users basically 
>> need to google it to find out.  That is fine for less common operations, but 
>> far from ideal from a basic one like copying.
>> 
> 
> Ah. I would look at solving this the other way: since this really
> isn't a path operation (in the same sense that moving/renaming and
> deleting are), keep it in shutil, but improve discoverability with a
> docs reference.

I tend to think that if move is in pathlib then copy makes sense.

As with all things pathlib it is a reasonable question to ask where should 
additions stop.

Barry

> 
> ChrisA
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-ideas@python.org/message/DD36UOFGIBHY63YDAVYKTR5CFMMD3GUC/
> Code of Conduct: http://python.org/psf/codeofconduct/
> 

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Z5YOAHHLNZ5BPC3VUBVQNZIBEWWUUVKI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to