summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-06-28 13:56:46 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-06-28 13:56:46 +0000
commit0d308f0324038f5e581131a0f48a795528dbc738 (patch)
tree00e918ca54b0c5cc35b2b4d983981af0b9332c58
parentcf6bc57eb9411a916e7d0470e761a2c539232a7e (diff)
downloadcpython-0d308f0324038f5e581131a0f48a795528dbc738.tar.gz
Fix Issue8653 - Docstring for urlunsplit function.
-rw-r--r--Lib/urlparse.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index 2a0407e1cb..e134770644 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