[Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

Barry barry at barrys-emacs.org
Wed Mar 14 16:40:26 EDT 2018



> On 12 Mar 2018, at 21:56, George Fischhof <george at fischhof.hu> wrote:
> 
> 
> 
> 2018-03-12 22:16 GMT+01:00 Paul Moore <p.f.moore at gmail.com>:
>> On 12 March 2018 at 20:57, George Fischhof <george at fischhof.hu> wrote:
>> > Good day all,
>> >
>> > as it seemed to be a good idea, I wrote a PEP proposal for pathlib to
>> > contain file operations.
>> >
>> > Here is the draft. What do you think about this?
>> 
>> I don't know for certain what I think I feel about the idea - in
>> general, it seems plausible. But I think you'll need to get down to
>> specifics in the PEP, exactly what functions do you suggest get added
>> to pathlib?
>> 
>> Paul
> 
> 
> Basically  file and directory operations: copy, rename, move, delete. With all variants.
> I will collect them, and put intot PEP
> 

I thought that because of __fspath__ conversions pathlib can be use with any function that needs a path. So long as shutil is Pathlib friendly isn’t this asolv d problem?

No need to extend pathlib for every file op, just pass the existed file ops a Path.

Wasn’t this discussed at the time fspath was added?

Barry

> George
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180314/a670574b/attachment.html>


More information about the Python-ideas mailing list