John O'Connor <tehj...@gmail.com> added the comment: Here is an update with the C implementation. I think a working prototype will be helpful before another round on python-dev.
I'm not sure how to handle unseekable, non-blocking streams where the read returns before `skip` bytes are exhausted. If prefetch() returns 0, then the caller would then have to use tell() to ensure subsequent reads are sane. In other words it seems prefetch() will leave the stream in an unpredictable state. Antoine, what are your thoughts? ---------- Added file: http://bugs.python.org/file23308/prefetch.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12053> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com