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

Function _splittype

Lib/urllib/parse.py:1244–1254  ·  view source on GitHub ↗

splittype('type:opaquestring') --> 'type', 'opaquestring'.

(url)

Source from the content-addressed store, hash-verified

1242
1243_typeprog = None
1244def _splittype(url):
1245 """splittype('type:opaquestring') --> 'type', 'opaquestring'."""
1246 global _typeprog
1247 if _typeprog is None:
1248 _typeprog = re.compile('([^/:]+):(.*)', re.DOTALL)
1249
1250 match = _typeprog.match(url)
1251 if match:
1252 scheme, data = match.groups()
1253 return scheme.lower(), data
1254 return None, url
1255
1256
1257def splithost(url):

Callers 5

urlretrieveFunction · 0.90
_parseMethod · 0.90
_parse_proxyFunction · 0.90
do_request_Method · 0.90
splittypeFunction · 0.85

Calls 4

compileMethod · 0.45
matchMethod · 0.45
groupsMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…