[Python-ideas] New PEP proposal -- Pathlib Module ShouldContain All File Operations -- version 2

Steve Dower steve.dower at python.org
Fri Mar 23 10:26:41 EDT 2018


I had a colleague complaining to me the other day about having to search multiple packages for the right function to move a file (implying: with the same semantics as drag-drop). 

If there isn’t a pathtools library on PyPI yet, this would certainly be valuable for newer developers. My view on Path is to either have everything on it or nothing on it (without removing what’s already there, of course), and since everything is so popular we should at least put everything in the one place.

Top-posted from my Windows phone

From: Mike Miller
Sent: Monday, March 19, 2018 10:51
To: python-ideas at python.org
Subject: Re: [Python-ideas] New PEP proposal -- Pathlib Module ShouldContain All File Operations -- version 2


On 2018-03-18 10:55, Paul Moore wrote:
>> Should Path() have methods to access all file operations?
> 
> No, (Counterexample, having a Path operation to set Windows ACLs for a path).

Agreed, not a big fan of everything filesystem-related in pathlib, simply 
because it doesn't read well.  Having them scattered isn't a great experience 
either.

Perhaps it would be better to have a filesystem package instead, maybe named 
"fs" that included all this stuff in one easy to use location.  File stuff from 
os, path stuff from os.path, pathlib, utils like stat, and shutil etc?
_______________________________________________
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/20180323/2cf75370/attachment.html>


More information about the Python-ideas mailing list