[New-bugs-announce] [issue22046] ZipFile.read() should mention that it might throw NotImplementedError

Jason Heeris report at bugs.python.org
Wed Jul 23 14:20:23 CEST 2014


New submission from Jason Heeris:

As per issue 5701, the zipfile.ZipFile.read() method will throw a NotImplementedError if the compression scheme is not supported. However, there is no mention of this possibility in the documentation for the read() method. I would suggest, say, "Calling read() on a ZipFile that uses an unsupported compression scheme (eg. implode) will raise a NotImplementedError."

It looks like you can use the testzip() method to check that this won't happen (ie. after you open the file but before you extract an entry). If that is really the expected way to check for this kind of condition, it would be nice to mention that too (under either method).

----------
assignee: docs at python
components: Documentation
messages: 223737
nosy: detly, docs at python
priority: normal
severity: normal
status: open
title: ZipFile.read() should mention that it might throw NotImplementedError
type: enhancement
versions: Python 2.7, Python 3.3

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


More information about the New-bugs-announce mailing list