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

Function get_extended_attrtext

Lib/email/_header_value_parser.py:2352–2368  ·  view source on GitHub ↗

attrtext = 1*(any non-ATTRIBUTE_ENDS character plus '%') This is a special parsing routine so that we get a value that includes % escapes as a single string (which we decode as a single string later).

(value)

Source from the content-addressed store, hash-verified

2350 return attribute, value
2351
2352def get_extended_attrtext(value):
2353 """attrtext = 1*(any non-ATTRIBUTE_ENDS character plus '%')
2354
2355 This is a special parsing routine so that we get a value that
2356 includes % escapes as a single string (which we decode as a single
2357 string later).
2358
2359 """
2360 m = _non_extended_attribute_end_matcher(value)
2361 if not m:
2362 raise errors.HeaderParseError(
2363 "expected extended attrtext but found {!r}".format(value))
2364 attrtext = m.group()
2365 value = value[len(attrtext):]
2366 attrtext = ValueTerminal(attrtext, 'extended-attrtext')
2367 _validate_xtext(attrtext)
2368 return attrtext, value
2369
2370def get_extended_attribute(value):
2371 """ [CFWS] 1*extended_attrtext [CFWS]

Callers 2

get_extended_attributeFunction · 0.85
get_parameterFunction · 0.85

Calls 5

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

Tested by

no test coverage detected