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

Function get_dot_atom_text

Lib/email/_header_value_parser.py:1365–1382  ·  view source on GitHub ↗

dot-text = 1*atext *("." 1*atext)

(value)

Source from the content-addressed store, hash-verified

1363 return atom, value
1364
1365def get_dot_atom_text(value):
1366 """ dot-text = 1*atext *("." 1*atext)
1367
1368 """
1369 dot_atom_text = DotAtomText()
1370 if not value or value[0] in ATOM_ENDS:
1371 raise errors.HeaderParseError("expected atom at a start of "
1372 "dot-atom-text but found '{}'".format(value))
1373 while value and value[0] not in ATOM_ENDS:
1374 token, value = get_atext(value)
1375 dot_atom_text.append(token)
1376 if value and value[0] == '.':
1377 dot_atom_text.append(DOT)
1378 value = value[1:]
1379 if dot_atom_text[-1] is DOT:
1380 raise errors.HeaderParseError("expected atom at end of dot-atom-text "
1381 "but found '{}'".format('.'+value))
1382 return dot_atom_text, value
1383
1384def get_dot_atom(value):
1385 """ dot-atom = [CFWS] dot-atom-text [CFWS]

Callers 2

get_dot_atomFunction · 0.85
get_msg_idFunction · 0.85

Calls 4

DotAtomTextClass · 0.85
get_atextFunction · 0.85
formatMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…