Serhiy Storchaka added the comment: There are yet few issues.
1. Currently RuntimeError is widely used in zipfile. But in most cases ValueError would be more appropriate since it programming error (for example ValueError is raised when try to read or write to closed file). See issue24693, but this is backward incompatible change. For new exceptions we are free to use any exception type without breaking backward compatibility. It looks to me, that ValueError is more appropriate is these cases than RuntimeError. What do you think about this Thomas? Here is a patch that changes exceptions types. 2. ZipInfo.is_dir() is not documented and lacks a docstring. 3. It would be better to make force_zip64 a keyword-only parameter. This would allow to add new positional parameters without breaking compatibility. ---------- resolution: fixed -> stage: resolved -> patch review status: closed -> open Added file: http://bugs.python.org/file42850/zipfile-open-w-exceptions.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26039> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com