예제 #1
0
 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'])
     # del kwds['decoded']
     self.init(name, **kwds)
     return self
예제 #2
0
 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'])
     # del kwds['decoded']
     self.init(name, **kwds)
     return self
예제 #3
0
 def _reconstruct(cls, value):
     return str.__new__(cls, value)
예제 #4
0
 def _reconstruct(cls, value):
     return str.__new__(cls, value)