MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_invalid_parameter

Function get_invalid_parameter

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

2248 return mime_version
2249
2250def get_invalid_parameter(value):
2251 """ Read everything up to the next ';'.
2252
2253 This is outside the formal grammar. The InvalidParameter TokenList that is
2254 returned acts like a Parameter, but the data attributes are None.
2255
2256 """
2257 invalid_parameter = InvalidParameter()
2258 while value and value[0] != ';':
2259 if value[0] in PHRASE_ENDS:
2260 invalid_parameter.append(ValueTerminal(value[0],
2261 'misplaced-special'))
2262 value = value[1:]
2263 else:
2264 token, value = get_phrase(value)
2265 invalid_parameter.append(token)
2266 return invalid_parameter, value
2267
2268def get_ttext(value):
2269 """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