(value)
return attrtext, value
attrtext = 1*(any non-ATTRIBUTE_ENDS character)

    We allow any non-ATTRIBUTE_ENDS in attrtext, but add defects to the
    token's defects list if we find non-attrtext characters.  We also register
    defects for *any* non-printables even though the RFC doesn't exclude all of
    them, because we follow the spirit of RFC 5322.
attrtext = 1*(any non-ATTRIBUTE_ENDS character)
attrtext = 1 * ( any non - ATTRIBUTE_ENDS character )
def get_attrtext(value):
    """attrtext = 1*(any non-ATTRIBUTE_ENDS character)

    We allow any non-ATTRIBUTE_ENDS in attrtext, but add defects to the
    token's defects list if we find non-attrtext characters.  We also register
    defects for *any* non-printables even though the RFC doesn't exclude all of
    them, because we follow the spirit of RFC 5322.

    """
    m = _non_attribute_end_matcher(value)
    if not m:
        raise errors.HeaderParseError(
            "expected attrtext but found {!r}".format(value))
    attrtext = m.group()
    value = value[len(attrtext):]
    attrtext = ValueTerminal(attrtext, 'attrtext')
    _validate_xtext(attrtext)
    return attrtext, value
def get_attrtext ( value ) : m = _non_attribute_end_matcher ( value ) if not m : raise errors . HeaderParseError ( "expected attrtext but found {!r}" . format ( value ) ) attrtext = m . group ( ) value = value [ len ( attrtext ) : ] attrtext = ValueTerminal ( attrtext , 'attrtext' ) _validate_xtext ( attrtext ) return attrtext , value