
On 27.03.2016 19:36, Stephen J. Turnbull wrote:
Koos Zevenhoven writes:
To be honest, I do think it feels like URL:s are becoming (or have become) just as important as paths, and that pathlib.Path should in the future work with URLs just like it now works with windows and posix paths.
+1
... to the concept, but: Is there a semantic difference between a RFC 3986 path component (Section 3.3), and a pathlib path? If there is, this could be a difficult project. (May as well start now, though!)
I would interpret the path of pathlib as a subset of functionality of path of a URI.
""" The path component contains data, usually organized in hierarchical form [...] serves to identify a resource within the scope of the URI's scheme and naming authority (if any). """
URI's scheme for path of pathlib could implicitly be: "file://"
Relative paths of pathlib are a subset of relative references (Section 4.1).
The only practical issue, I can think of is, how to distinguish (in the sense of avoiding hidden bugs) file paths and url paths.
And name clashes when communicating with your fellow programmers: "I got that url path working" "the url path or the url path path?"
Best, Sven