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

Function get_quoted_string

Lib/email/_header_value_parser.py:1320–1336  ·  view source on GitHub ↗

quoted-string = [CFWS] [CFWS] 'bare-quoted-string' is an intermediate class defined by this parser and not by the RFC grammar. It is the quoted string without any attached CFWS.

(value)

Source from the content-addressed store, hash-verified

1318 return cfws, value
1319
1320def get_quoted_string(value):
1321 """quoted-string = [CFWS] <bare-quoted-string> [CFWS]
1322
1323 'bare-quoted-string' is an intermediate class defined by this
1324 parser and not by the RFC grammar. It is the quoted string
1325 without any attached CFWS.
1326 """
1327 quoted_string = QuotedString()
1328 if value and value[0] in CFWS_LEADER:
1329 token, value = get_cfws(value)
1330 quoted_string.append(token)
1331 token, value = get_bare_quoted_string(value)
1332 quoted_string.append(token)
1333 if value and value[0] in CFWS_LEADER:
1334 token, value = get_cfws(value)
1335 quoted_string.append(token)
1336 return quoted_string, value
1337
1338def get_atom(value):
1339 """atom = [CFWS] 1*atext [CFWS]

Callers 3

get_wordFunction · 0.85
get_valueFunction · 0.85
get_parameterFunction · 0.85

Calls 4

QuotedStringClass · 0.85
get_cfwsFunction · 0.85
get_bare_quoted_stringFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…