Serhiy Storchaka added the comment: It should be documented (if still not) that OSError() constructor can return an instance of OSError subclass, depending on errno value.
>>> OSError(errno.ENOENT, 'no such file') FileNotFoundError(2, 'no such file') ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23391> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com