[Python-ideas] URLs/URIs + pathlib.Path + literal syntax = ?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 29 18:06:19 EDT 2016


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.

-- 
Greg


More information about the Python-ideas mailing list