[Python-Dev] Re: Exceptional inheritance patterns (original) (raw)

Skip Montanaro skip at pobox.com
Fri Aug 6 14:55:52 CEST 2004


Michael> I would like an exception class that almost exceptions except
Michael> KeyboardInterrupt, SystemExit and -- maybe -- RuntimeError and
Michael> MemoryError inherited from.

Michael> except ExceptionsButThoseNastyOnesIDontWantToCatch:
Michael>     pass

Michael> ? <wink>

I proposed a change to the exceptions hierarchy a few years ago that would allow this. It was obviously never implemented, but I no longer remember why.

Skip



More information about the Python-Dev mailing list