[issue6664] readlines should understand Line Separator and Paragraph Separator characters

Jeffrey Finkelstein report at bugs.python.org
Fri Oct 1 18:20:58 CEST 2010


Jeffrey Finkelstein <jeffrey.finkelstein at gmail.com> added the comment:

This seems to be because codecs.StreamReader.readlines() function does this:

    def readlines(self, sizehint=None, keepends=True):
        data = self.read()
        return data.splitlines(keepends)

But the io readlines() functions make multiple calls to readline() instead.

Here is the test case which passes on the codecs readlines() but fails on the io readlines().

----------
keywords: +patch
nosy: +jfinkels
Added file: http://bugs.python.org/file19086/issue6664.testcase.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6664>
_______________________________________


More information about the Python-bugs-list mailing list