try-except syntax

Gregory Ewing greg.ewing at canterbury.ac.nz
Thu Apr 5 18:59:08 EDT 2018


Ben Bacarisse wrote:
> Anyway, to coalesce two or more exception handlers, you are probably
> looking for
> 
>   except (ImportError, RuntimeError):

To the OP: Are you sure you really want to mask RuntimeError here?
Usually it means something has gone seriously wrong, and is a
symptom that shouldn't be ignored.

-- 
Greg



More information about the Python-list mailing list