As mentioned in Issue 20132, iterencode() and iterdecode() only work on text-to-byte codecs, because they assume particular data types when finalizing the incremental codecs. This patch changes the signature of the IncrementalEncoder and IncrementalDecoder methods from
IncrementalEncoder.encode(object[, final])
IncrementalEncoder.decode(object[, final])
to
IncrementalEncoder.encode([object,] [final])
IncrementalEncoder.decode([object,] [final])
so that iteren/decode(), and perhaps in the future, StreamWriter/Reader, can operate the incremental codec without knowing what kind of data should be processed. |