mirror of
https://github.com/python/cpython.git
synced 2025-08-08 02:48:55 +00:00
Fix Issue8653 - Docstring for urlunsplit function.
This commit is contained in:
parent
2af7e6d2d9
commit
5871a8d744
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue