try... except with unknown error types
stefan-usenet at bytereef.org
Fri Sep 9 23:41:18 CEST 2011
Chris Torek <nospam at torek.net> wrote:
> (I have also never been sure whether something is going to raise
> an IOError or an OSError for various OS-related read or write
> operation failures -- such as exceeding a resource limit, for
> instance -- so most places that do I/O operations on OS files, I
> catch both. Still, it sure would be nice to have a static analysis
> tool that could answer questions about potential exceptions. :-) )
There is an effort to fix this:
And an implementation ...
... together with a feature request:
I think the whole concept makes a lot of sense and is really worth
taking a look at.
More information about the Python-list