Serhiy Storchaka added the comment:
This is obviously a duplicate of issue8260 and issue12446.
--
nosy: +serhiy.storchaka
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - When I use codecs.open(...) and f.readline() follow up by
f.read() return
Andrew and...@learnirvana.com added the comment:
Just got this behavior, with readlines(), which is unsurprising since it
internally uses read() as described in the original bug report.
The break on line 468 of codecs.py seems to be the problem, it fixes it if I
remove this conditional
New submission from Mikko Rasa t...@tdb.fi:
For regular files, a read() call without arguments will read until EOF.
codecs.StreamReader does its own buffering, and if there are characters in the
buffer, a read() call will be satisfied from the buffer without an attempt to
read the rest of
STINNER Victor victor.stin...@gmail.com added the comment:
Oh, yet another bug in in codecs.StreamReader. I should add it to the PEP :-)
http://www.python.org/dev/peps/pep-0400/
Use io.TextIOWrapper (open) instead of codecs.StreamReader (codecs.open), it's
bugfree :-)
--
nosy: +haypo