New submission from Martin Panter: 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. ---------- components: Library (Lib), Unicode files: final-no-object.patch keywords: patch messages: 233932 nosy: ezio.melotti, haypo, vadmium priority: normal severity: normal status: open title: Fix codecs.iterencode/decode() by allowing data parameter to be omitted type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file37691/final-no-object.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23231> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com