Alexandre Vassalotti <alexan...@peadrop.com> added the comment: Victor, Unpickler shouldn't raise an error if the given file object does support seek(); it should gracefully fall back to using only read() and readline(). Also, I think you could get a greater performance improvement by using peek() and avoiding backward seeks. As far as I know, a backward seek may invalidate the internal buffer of the file object, thus forcing a read from disk.
Incidentally, I think it would be nice to add to Python 3 some kind of file protocol as this would provide a way to mitigate the function call overhead for I/O operations. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3873> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com