MCPcopy Index your code
hub / github.com/python/cpython / _urlunsplit

Function _urlunsplit

Lib/urllib/parse.py:683–695  ·  view source on GitHub ↗
(scheme, netloc, url, query, fragment)

Source from the content-addressed store, hash-verified

681 return _coerce_result(_urlunsplit(scheme, netloc, url, query, fragment))
682
683def _urlunsplit(scheme, netloc, url, query, fragment):
684 if netloc is not None:
685 if url and url[:1] != '/': url = '/' + url
686 url = '//' + netloc + url
687 elif url[:2] == '//':
688 url = '//' + url
689 if scheme:
690 url = scheme + ':' + url
691 if query is not None:
692 url = url + '?' + query
693 if fragment is not None:
694 url = url + '#' + fragment
695 return url
696
697def urljoin(base, url, allow_fragments=True):
698 """Join a base URL and a possibly relative URL to form an absolute

Callers 4

urlunparseFunction · 0.85
urlunsplitFunction · 0.85
urljoinFunction · 0.85
urldefragFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…