Antoine Pitrou pit...@free.fr added the comment:
By design, readlines() only recognizes those characters which are official line
separators on various OSes (\n, \r, \r\n). This is important for proper parsing
of log files, internet protocols, etc.
If you want to split on all line separators
Jeffrey Finkelstein jeffrey.finkelst...@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()
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: +benjamin.peterson, pitrou
stage: - needs patch
type: - behavior
versions: +Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6664
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +haypo, lemburg
versions: -Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6664
___
New submission from Neil Hodgson nyamaton...@users.sourceforge.net:
Unicode includes Line Separator U+2028 and Paragraph Separator U+2029
line ending characters. The readlines method of the file object returned
by the built-in open does not treat these characters as line ends
although the object