[Python-Dev] PEP 428 - pathlib - ready for approval

Giampaolo Rodola' g.rodola at gmail.com
Wed Nov 20 22:39:43 CET 2013


On Tue, Nov 19, 2013 at 10:04 PM, Antoine Pitrou <solipsis at pitrou.net>wrote:

>
> Hello,
>
> Guido has told me that he was ready to approve PEP 428 (pathlib) in its
> latest amended form.  Here is the last call for any comments or
> arguments against approval, before Guido marks the PEP accepted (or
> changes his mind :-)).
>
> Regards
>
> Antoine.
>


Isn't this redundant?

>>> Path.cwd()
PosixPath('/home/antoine/pathlib')

Probably this is just personal taste but I'd prefer the more explicit:

>>> Path(os.getcwd())
PosixPath('/home/antoine/pathlib')

I understand all the os.* replication (Path.rename, Path.stat etc.) but all
these methods assume you're dealing with an instantiated Path instance
whereas Path.cwd is the only one which doesn't.
Not a big deal anyway, it just catched my eye because it's different.
Other than that the module looks absolutely awesome and a big improvement
over os.path!


--- Giampaolo
https://code.google.com/p/pyftpdlib/
https://code.google.com/p/psutil/
https://code.google.com/p/pysendfile/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131120/495b8c75/attachment.html>


More information about the Python-Dev mailing list