

def __new__(cls, name, value):
    kwds = {
        'defects': [],
    }
    cls.parse(value, kwds)
    if utils._has_surrogates(kwds['decoded']):
        kwds['decoded'] = utils._sanitize(kwds['decoded'])
    self = str.__new__(cls, kwds['decoded'])
    self.init(name, **kwds)
    return self

dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/email/headerregistry.py BaseHeader.__new__/original