best idiom for wide try/except net?
missive at frontiernet.net
Fri Jun 20 00:06:37 CEST 2003
> The only workaround I've thought of is this, which looks a bit ugly to
> me (it seems a shame to have to explicitly catch stuff I don't want):
> # code that might have bugs
> except (SystemExit, KeyboardInterrupt):
> # exceptions I do not want to catch
> # all other exceptions
> Any suggestions?
That seems pretty nice to me,
but I think you are looking for
raise instead of throw.
More information about the Python-list