

def __init__(self, display_name='', username='', domain='', addr_spec=None):
    "Create an object represeting a full email address.\n\n        An address can have a 'display_name', a 'username', and a 'domain'.  In\n        addition to specifying the username and domain separately, they may be\n        specified together by using the addr_spec keyword *instead of* the\n        username and domain keywords.  If an addr_spec string is specified it\n        must be properly quoted according to RFC 5322 rules; an error will be\n        raised if it is not.\n\n        An Address object has display_name, username, domain, and addr_spec\n        attributes, all of which are read-only.  The addr_spec and the string\n        value of the object are both quoted according to RFC5322 rules, but\n        without any Content Transfer Encoding.\n\n        "
    if (addr_spec is not None):
        if (username or domain):
            raise TypeError('addrspec specified when username and/or domain also specified')
        (a_s, rest) = parser.get_addr_spec(addr_spec)
        if rest:
            raise ValueError("Invalid addr_spec; only '{}' could be parsed from '{}'".format(self, addr_spec))
        if a_s.all_defects:
            raise a_s.all_defects[0]
        username = a_s.local_part
        domain = a_s.domain
    self._display_name = display_name
    self._username = username
    self._domain = domain

dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/email/headerregistry.py Address.__init__/VarMisuse@79/416 `a_s`->`self`