

def header_store_parse(self, name, value):
    "+\n        The name is returned unchanged.  If the input value has a 'name'\n        attribute and it matches the name ignoring case, the value is returned\n        unchanged.  Otherwise the name and value are passed to header_factory\n        method, and the resulting custom header object is returned as the\n        value.  In this case a ValueError is raised if the input value contains\n        CR or LF characters.\n\n        "
    if (hasattr(value, 'name') and (value.name.lower() == name.lower())):
        return (name, value)
    if (isinstance(value, str) and (len(value.splitlines()) > 1)):
        raise ValueError('Header values may not contain linefeed or carriage return characters')
    return (name, self.header_factory(name, value))

dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/email/policy.py EmailPolicy.header_store_parse/original