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

Function _generate_unquoted_parts

Lib/urllib/parse.py:826–834  ·  view source on GitHub ↗
(string, encoding, errors)

Source from the content-addressed store, hash-verified

824_asciire = re.compile('([\x00-\x7f]+)')
825
826def _generate_unquoted_parts(string, encoding, errors):
827 previous_match_end = 0
828 for ascii_match in _asciire.finditer(string):
829 start, end = ascii_match.span()
830 yield string[previous_match_end:start] # Non-ASCII
831 # The ascii_match[1] group == string[start:end].
832 yield _unquote_impl(ascii_match[1]).decode(encoding, errors)
833 previous_match_end = end
834 yield string[previous_match_end:] # Non-ASCII tail
835
836def unquote(string, encoding='utf-8', errors='replace'):
837 """Replace %xx escapes by their single-character equivalent. The optional

Callers 1

unquoteFunction · 0.85

Calls 2

_unquote_implFunction · 0.85
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…