Lines Matching defs:decode
77 def __new__(cls, encode, decode, streamreader=None, streamwriter=None,
79 self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter))
82 self.decode = decode
96 The .encode()/.decode() methods may use different error
133 def decode(self, input, errors='strict'):
232 passed piece by piece to the decode() method. The IncrementalDecoder
233 remembers the state of the decoding process between calls to decode().
245 def decode(self, input, final=False):
262 were passed to decode() that have not yet been converted.
286 self.buffer = "" # undecoded input that is kept between calls to decode()
289 # Overwrite this method in subclasses: It must decode input
293 def decode(self, input, final=False):
294 # decode input (taking the buffer into account)
421 def decode(self, input, errors='strict'):
437 -1 indicates to read and decode as much as possible. size
438 is intended to prevent having to decode huge files in one
474 # decode bytes (those remaining from the last call included)
477 newchars, decodedbytes = self.decode(data, self.errors)
480 newchars, decodedbytes = self.decode(data[:exc.start], self.errors)
746 def __init__(self, stream, encode, decode, Reader, Writer,
750 conversion: encode and decode work on the frontend (the
760 encode, decode must adhere to the Codec interface, Reader,
764 encode and decode are needed for the frontend translation,
774 self.decode = decode
812 data, bytesdecoded = self.decode(data, self.errors)
818 data, bytesdecoded = self.decode(data, self.errors)
919 sr = StreamRecoder(file, data_info.encode, data_info.decode,
946 return lookup(encoding).decode
1025 output = decoder.decode(input)
1028 output = decoder.decode("", True)