def encode(self, input, errors='strict'): self.encode = codecs.utf_8_encode return encode(input, errors)