

def __str__(self):
    nameset = set(self.display_name)
    if (len(nameset) > len((nameset - parser.SPECIALS))):
        disp = parser.quote_string(self.display_name)
    else:
        disp = self.display_name
    if disp:
        addr_spec = ('' if (self.addr_spec == '<>') else self.addr_spec)
        return '{} <{}>'.format(disp, addr_spec)
    return self.addr_spec

dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/email/headerregistry.py Address.__str__/original