summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-10-24 14:43:28 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-10-24 14:43:28 (GMT)
commitb75e7f52698ff85b438ac3c8241b7b867213c99b (patch)
tree83254b6c02d08603a3d3f5d694748a4292e11ea3 /Lib
parent97a763d104839ed033a000fe20cbb9588f74d44b (diff)
parent0a467d1b8613edfff9f608da8622c716c882ac00 (diff)
downloadcpython-b75e7f52698ff85b438ac3c8241b7b867213c99b.zip
cpython-b75e7f52698ff85b438ac3c8241b7b867213c99b.tar.gz
cpython-b75e7f52698ff85b438ac3c8241b7b867213c99b.tar.bz2
Issue21160: Correct comments in nturl2path. Patch by Jurko Gospodnetić.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/nturl2path.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/nturl2path.py b/Lib/nturl2path.py
index 5a6d44a..36dc765 100644
--- a/Lib/nturl2path.py
+++ b/Lib/nturl2path.py
@@ -4,9 +4,11 @@ def url2pathname(url):
"""OS-specific conversion from a relative URL of the 'file' scheme
to a file system path; not recommended for general use."""
# e.g.
- # ///C|/foo/bar/spam.foo
- # becomes
- # C:\foo\bar\spam.foo
+ # ///C|/foo/bar/spam.foo
+ # and
+ # ///C:/foo/bar/spam.foo
+ # become
+ # C:\foo\bar\spam.foo
import string, urllib.parse
# Windows itself uses ":" even in URLs.
url = url.replace(':', '|')
@@ -39,9 +41,9 @@ def pathname2url(p):
"""OS-specific conversion from a file system path to a relative URL
of the 'file' scheme; not recommended for general use."""
# e.g.
- # C:\foo\bar\spam.foo
+ # C:\foo\bar\spam.foo
# becomes
- # ///C|/foo/bar/spam.foo
+ # ///C:/foo/bar/spam.foo
import urllib.parse
if not ':' in p:
# No drive specifier, just convert slashes and quote the name