]> granicus.if.org Git - python/commitdiff
Fix Issue8653 - Docstring for urlunsplit function.
authorSenthil Kumaran <orsenthil@gmail.com>
Mon, 28 Jun 2010 13:56:46 +0000 (13:56 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Mon, 28 Jun 2010 13:56:46 +0000 (13:56 +0000)
Lib/urlparse.py

index 2a0407e1cb2d77fd714a8d4442267f6296943643..e134770644f9a2532963067fe72749a6c9524f5b 100644 (file)
@@ -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