[Python-ideas] URLs/URIs + pathlib.Path + literal syntax = ?
Michael Selik
mike at selik.org
Tue Mar 29 18:17:05 EDT 2016
On Tue, Mar 29, 2016 at 6:06 PM Greg Ewing <greg.ewing at canterbury.ac.nz>
wrote:
> Koos Zevenhoven wrote:
> > - Only some URIs (or even URLs) can be reliably distinguished from
> > file paths. However, those that contain '://' could be automatically
> > turned into URI objects by p-strings [or Path(...)].
>
> No, they couldn't. "hello://world" is a perfectly valid unix
> pathname (albeit slightly redundant due to the double slash).
> I would not want Path() deciding that I really meant it to
> be a URI.
>
>
Good point. Even worse:
$ mkdir ftp://www.example.com
$ tree
.
└── ftp:/
└── www.example.com/
2 directories, 0 files
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160329/9d1df609/attachment-0001.html>
More information about the Python-ideas
mailing list