[docs] [issue22046] ZipFile.read() should mention that it might throw NotImplementedError

Serhiy Storchaka report at bugs.python.org
Wed Aug 6 08:53:23 CEST 2014


Serhiy Storchaka added the comment:

ZipFile's constructor and ZipFile.open() can raise NotImplementedError, RuntimeError, EOFError, IOError, OSError or its subclasses, or any exception raised from underlying file object, including TypeError and AttributeError. ZipExtFile.read() can raise zlib.error, lzma.LZMAError, EOFError, IOError, OSError, etc. Any method can raise unexpected exception when used in unusual circumstances (with threads, in signal handler, in destructor, at shutdown stage). I don't think we should document all these exception. Python documentation never document all possible exceptions raised by a method.

----------

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


More information about the docs mailing list