Commit 458123bd authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue21160: Correct comments in nturl2path. Patch by Jurko Gospodnetić.

parent 677744b3
...@@ -5,7 +5,9 @@ def url2pathname(url): ...@@ -5,7 +5,9 @@ def url2pathname(url):
to a file system path; not recommended for general use.""" to a file system path; not recommended for general use."""
# e.g. # e.g.
# ///C|/foo/bar/spam.foo # ///C|/foo/bar/spam.foo
# becomes # and
# ///C:/foo/bar/spam.foo
# become
# C:\foo\bar\spam.foo # C:\foo\bar\spam.foo
import string, urllib.parse import string, urllib.parse
# Windows itself uses ":" even in URLs. # Windows itself uses ":" even in URLs.
...@@ -41,7 +43,7 @@ def pathname2url(p): ...@@ -41,7 +43,7 @@ def pathname2url(p):
# e.g. # e.g.
# C:\foo\bar\spam.foo # C:\foo\bar\spam.foo
# becomes # becomes
# ///C|/foo/bar/spam.foo # ///C:/foo/bar/spam.foo
import urllib.parse import urllib.parse
if not ':' in p: if not ':' in p:
# No drive specifier, just convert slashes and quote the name # No drive specifier, just convert slashes and quote the name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment