summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-06-28 13:56:46 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-06-28 13:56:46 (GMT)
commit5871a8d744f135840c52d0ec2301aa788f52d934 (patch)
tree5b683c8bc4072eb17f3eab262ff32e0a3a3f5dd1 /Lib
parent2af7e6d2d9897ccff605fa4f57e4c6de9b4bc980 (diff)
downloadcpython-5871a8d744f135840c52d0ec2301aa788f52d934.zip
cpython-5871a8d744f135840c52d0ec2301aa788f52d934.tar.gz
cpython-5871a8d744f135840c52d0ec2301aa788f52d934.tar.bz2
Fix Issue8653 - Docstring for urlunsplit function.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urlparse.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index 2a0407e..e134770 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -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