Author lemburg
Recipients amcnabb, doerwalter, jcea, lemburg, loewis, martin.panter, vstinner
Date 2015-01-15.08:48:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 15.01.2015 05:43, Martin Panter wrote:
> New patch that also fixes StreamWriter.writelines() in general for the byte codecs

Could you explain this new undocumented class ?

+class _IncrementalBasedWriter(StreamWriter):
+    """Generic StreamWriter implementation.
+        The _EncoderClass attribute must be set to an IncrementalEncoder
+        class to use.
+    """
+    def __init__(self, stream, errors='strict'):
+        super().__init__(stream, errors)
+        self._encoder = self._Encoder(errors)
+    def write(self, object):
+    def reset(self):

Note that the doc-string mentions a non-existing attribute and there
are doc-string missing for the other methods.

The purpose appears to be a StreamWriter which works with
an IncrementalEncoder. A proper name would thus be
IncrementalStreamWriter which provides an .encode()
method which adapts the signature of the incremental encoder
to the one expected for StreamWriters and Codecs.
Date User Action Args
2015-01-15 08:48:52lemburgsetrecipients: + lemburg, loewis, doerwalter, jcea, amcnabb, vstinner, martin.panter
2015-01-15 08:48:52lemburglinkissue13881 messages
2015-01-15 08:48:52lemburgcreate