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

Function get_qcontent

Lib/email/_header_value_parser.py:1191–1204  ·  view source on GitHub ↗

qcontent = qtext / quoted-pair We allow anything except the DQUOTE character, but if we find any ASCII other than the RFC defined printable ASCII, a NonPrintableDefect is added to the token's defects list. Any quoted pairs are converted to their unquoted values, so what is returned

(value)

Source from the content-addressed store, hash-verified

1189 return ptext, value
1190
1191def get_qcontent(value):
1192 """qcontent = qtext / quoted-pair
1193
1194 We allow anything except the DQUOTE character, but if we find any ASCII
1195 other than the RFC defined printable ASCII, a NonPrintableDefect is
1196 added to the token's defects list. Any quoted pairs are converted to their
1197 unquoted values, so what is returned is a 'ptext' token. In this case it
1198 is a ValueTerminal.
1199
1200 """
1201 ptext, value, _ = _get_ptext_to_endchars(value, '"')
1202 ptext = ValueTerminal(ptext, 'ptext')
1203 _validate_xtext(ptext)
1204 return ptext, value
1205
1206def get_atext(value):
1207 """atext = <matches _atext_matcher>

Callers 2

get_bare_quoted_stringFunction · 0.85
get_parameterFunction · 0.85

Calls 3

_get_ptext_to_endcharsFunction · 0.85
ValueTerminalClass · 0.85
_validate_xtextFunction · 0.85

Tested by

no test coverage detected