[Python-ideas] Add a .pop() method to ZipFile

Daniel Holth dholth at gmail.com
Fri May 10 22:47:31 CEST 2013


On Fri, May 10, 2013 at 4:25 PM, Serhiy Storchaka <storchaka at gmail.com> wrote:
> 10.05.13 22:38, Andrew Barnert написав(ла):
>
>> It seems like the code is already making unwarranted assumptions about the
>> internals of ZipFile, and taking out the access to a private attribute
>> doesn't fix that, it just makes it less obvious.
>
>
> Indeed. infolist() may return a copy or non-modifiable proxy, NameToInfo and
> fp are private attributes. ZipFile may save in private attribute an offset
> of central directory.

It would be nice to have a better low-level API to ZipFile. Does it
ever do these things that it may do?



More information about the Python-ideas mailing list