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

Function get_invalid_parameter

Lib/email/_header_value_parser.py:2293–2309  ·  view source on GitHub ↗

Read everything up to the next ';'. This is outside the formal grammar. The InvalidParameter TokenList that is returned acts like a Parameter, but the data attributes are None.

(value)

Source from the content-addressed store, hash-verified

2291 return mime_version
2292
2293def get_invalid_parameter(value):
2294 """ Read everything up to the next ';'.
2295
2296 This is outside the formal grammar. The InvalidParameter TokenList that is
2297 returned acts like a Parameter, but the data attributes are None.
2298
2299 """
2300 invalid_parameter = InvalidParameter()
2301 while value and value[0] != ';':
2302 if value[0] in PHRASE_ENDS:
2303 invalid_parameter.append(ValueTerminal(value[0],
2304 'misplaced-special'))
2305 value = value[1:]
2306 else:
2307 token, value = get_phrase(value)
2308 invalid_parameter.append(token)
2309 return invalid_parameter, value
2310
2311def get_ttext(value):
2312 """ttext = <matches _ttext_matcher>

Callers 1

parse_mime_parametersFunction · 0.85

Calls 4

InvalidParameterClass · 0.85
ValueTerminalClass · 0.85
get_phraseFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…