MCPcopy Index your code
hub / github.com/RustPython/RustPython / urlunsplit

Function urlunsplit

Lib/urllib/parse.py:550–564  ·  view source on GitHub ↗

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

(components)

Source from the content-addressed store, hash-verified

548 query or None, fragment or None))
549
550def urlunsplit(components):
551 """Combine the elements of a tuple as returned by urlsplit() into a
552 complete URL as a string. The data argument can be any five-item iterable.
553 This may result in a slightly different, but equivalent URL, if the URL that
554 was parsed originally had unnecessary delimiters (for example, a ? with an
555 empty query; the RFC states that these are equivalent)."""
556 scheme, netloc, url, query, fragment, _coerce_result = (
557 _coerce_args(*components))
558 if not netloc:
559 if scheme and scheme in uses_netloc and (not url or url[:1] == '/'):
560 netloc = ''
561 else:
562 netloc = None
563 return _coerce_result(_urlunsplit(scheme or None, netloc, url,
564 query or None, fragment or None))
565
566def _urlunsplit(scheme, netloc, url, query, fragment):
567 if netloc is not None:

Callers 2

geturlMethod · 0.85
geturlMethod · 0.85

Calls 2

_coerce_argsFunction · 0.85
_urlunsplitFunction · 0.85

Tested by

no test coverage detected