复制代码def encode(self, input, final=False): return codecs.raw_unicode_escape_encode(input, self.errors)[0]