Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0984cb48
Commit
0984cb48
authored
Oct 24, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue21160: Correct comments in nturl2path. Patch by Jurko Gospodnetić.
parents
4e9bc0bd
55dc79a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Lib/nturl2path.py
Lib/nturl2path.py
+7
-5
No files found.
Lib/nturl2path.py
View file @
0984cb48
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment