Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

The problem seems to be fixed in trunk (the future 2.7).
BufferedRandom.seek() contains a block labelled "# Undo read ahead." which does 
not exists in 2.6.

I reproduce the problem with a file opened with mode "rb+"

from io import open
open("tmpfile", "wb").write("abcdefgh" * 1024 + "X")
f = open("tmpfile", "rb+")
print f.read(1) # "a"
f.seek(0, 1)
print f.read(1) # should be "b", 2.6 returns "X"

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7640>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to