[New-bugs-announce] [issue33482] codecs.StreamRecoder.writelines is broken
Jelle Zijlstra
report at bugs.python.org
Sun May 13 10:33:47 EDT 2018
New submission from Jelle Zijlstra <jelle.zijlstra at gmail.com>:
codecs.StreamRecoder.writelines is implemented as:
def writelines(self, list):
data = ''.join(list)
data, bytesdecoded = self.decode(data, self.errors)
return self.writer.write(data)
It can't take a list of bytes because then the ''.join throws an error, and it can't take a list of str because self.decode takes bytes.
It looks like bytes are intended (self.write takes bytes), so I'll submit a simple PR to fix this.
----------
messages: 316465
nosy: Jelle Zijlstra
priority: normal
severity: normal
status: open
title: codecs.StreamRecoder.writelines is broken
versions: Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33482>
_______________________________________
More information about the New-bugs-announce
mailing list