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

Function _generate_unquoted_parts

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

Source from the content-addressed store, hash-verified

704_asciire = re.compile('([\x00-\x7f]+)')
705
706def _generate_unquoted_parts(string, encoding, errors):
707 previous_match_end = 0
708 for ascii_match in _asciire.finditer(string):
709 start, end = ascii_match.span()
710 yield string[previous_match_end:start] # Non-ASCII
711 # The ascii_match[1] group == string[start:end].
712 yield _unquote_impl(ascii_match[1]).decode(encoding, errors)
713 previous_match_end = end
714 yield string[previous_match_end:] # Non-ASCII tail
715
716def unquote(string, encoding='utf-8', errors='replace'):
717 """Replace %xx escapes by their single-character equivalent. The optional

Callers 1

unquoteFunction · 0.85

Calls 4

_unquote_implFunction · 0.85
finditerMethod · 0.80
spanMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected