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

Function get_atext

Lib/email/_header_value_parser.py:1223–1237  ·  view source on GitHub ↗

atext = We allow any non-ATOM_ENDS in atext, but add an InvalidATextDefect to the token's defects list if we find non-atext characters.

(value)

Source from the content-addressed store, hash-verified

1221 return ptext, value
1222
1223def get_atext(value):
1224 """atext = <matches _atext_matcher>
1225
1226 We allow any non-ATOM_ENDS in atext, but add an InvalidATextDefect to
1227 the token&#x27;s defects list if we find non-atext characters.
1228 """
1229 m = _non_atom_end_matcher(value)
1230 if not m:
1231 raise errors.HeaderParseError(
1232 "expected atext but found '{}'".format(value))
1233 atext = m.group()
1234 value = value[len(atext):]
1235 atext = ValueTerminal(atext, 'atext')
1236 _validate_xtext(atext)
1237 return atext, value
1238
1239def get_bare_quoted_string(value):
1240 """bare-quoted-string = DQUOTE *([FWS] qcontent) [FWS] DQUOTE

Callers 2

get_atomFunction · 0.85
get_dot_atom_textFunction · 0.85

Calls 4

ValueTerminalClass · 0.85
_validate_xtextFunction · 0.85
formatMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…