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
5871a8d7
Commit
5871a8d7
authored
Jun 28, 2010
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Issue8653 - Docstring for urlunsplit function.
parent
2af7e6d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Lib/urlparse.py
Lib/urlparse.py
+5
-0
No files found.
Lib/urlparse.py
View file @
5871a8d7
...
...
@@ -217,6 +217,11 @@ def urlunparse(data):
return
urlunsplit
((
scheme
,
netloc
,
url
,
query
,
fragment
))
def
urlunsplit
(
data
):
"""Combine the elements of a tuple as returned by urlsplit() into a
complete URL as a string. The data argument can be any five-item iterable.
This may result in a slightly different, but equivalent URL, if the URL that
was parsed originally had unnecessary delimiters (for example, a ? with an
empty query; the RFC states that these are equivalent)."""
scheme
,
netloc
,
url
,
query
,
fragment
=
data
if
netloc
or
(
scheme
and
scheme
in
uses_netloc
and
url
[:
2
]
!=
'//'
):
if
url
and
url
[:
1
]
!=
'/'
:
url
=
'/'
+
url
...
...
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