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

Koos Zevenhoven k7hoven at gmail.com
Wed Mar 30 09:30:15 EDT 2016


On Wed, Mar 30, 2016 at 10:55 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> the fact that most paths come
> from variables, not from literals, and many come from user input
> (sometimes even unintended user input such as a "*" expanded by the
> shell)? It's easy enough to rewrite literals to be unambiguous, but in
> order to do so for arbitrary input you need to basically implement
> (part of) a URI parser...
>

If a user input (or config file) says
"http://www.example.com/page.html", what does the user want? The http
URL or the relative file-system path
"http:/www.example.com/page.html"? How often are users *explicitly*
asked for a *file-system path*? And if they notice that 'http://...'
does not by default refer to the file system, who will complain?

Maybe someone can imagine a realistic situation where interpreting
"scheme://..." interpreted as an URI causes problems?

- Koos


More information about the Python-ideas mailing list