[issue33361] readline() + seek() on io.EncodedFile breaks next readline()

Elena Oat report at bugs.python.org
Thu Apr 26 08:16:14 EDT 2018


Elena Oat <oat.elena at gmail.com> added the comment:

I cannot replicate this when the stream is:

In: stream_ex = io.BytesIO(u"abc\ndef\nghi\n".encode("utf-8"))
In: f = codecs.EncodedFile(stream_ex, 'utf-8')

In: run(f)

Out: Got header: b'abc\n'
Skipping the header: b'abc\n'
Line 2: b'def\n'
Line 3: b'ghi\n'

----------
nosy: +Elena.Oat

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33361>
_______________________________________


More information about the Python-bugs-list mailing list