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

Function get_qcontent

Lib/email/_header_value_parser.py:1208–1221  ·  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

1206 return ptext, value
1207
1208def get_qcontent(value):
1209 """qcontent = qtext / quoted-pair
1210
1211 We allow anything except the DQUOTE character, but if we find any ASCII
1212 other than the RFC defined printable ASCII, a NonPrintableDefect is
1213 added to the token's defects list. Any quoted pairs are converted to their
1214 unquoted values, so what is returned is a 'ptext' token. In this case it
1215 is a ValueTerminal.
1216
1217 """
1218 ptext, value, _ = _get_ptext_to_endchars(value, '"')
1219 ptext = ValueTerminal(ptext, 'ptext')
1220 _validate_xtext(ptext)
1221 return ptext, value
1222
1223def get_atext(value):
1224 """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

Used in the wild real call sites across dependent graphs

searching dependent graphs…