[issue14099] ZipFile.open() should not reopen the underlying file

Serhiy Storchaka report at bugs.python.org
Mon Dec 3 18:12:45 CET 2012


Serhiy Storchaka added the comment:

> This idiom currently works and should not be broken.

Hmm. This seems doubtful to me, but if it is used, then I agree, it shouldn't be broken.

> I guess that the slowdown by seek() is neglectable compared to this.

Even one function call can have effect on performance of short reads (issue10376, issue16304). Fortunately in this corner case the read buffer will be used.

> Also note that we most often seek to the current position; the OS should notice that and return swiftly.

This may affect the buffered Python file (I did not check). The OS also doesn't notice this if the OS is Windows (issue8745).

I want to see and test an updated patch.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14099>
_______________________________________


More information about the Python-bugs-list mailing list