[Python-Dev] Re: Exceptional inheritance patterns (original) (raw)
Guido van Rossum guido at python.org
Fri Aug 6 16:52:39 CEST 2004
- Previous message: [Python-Dev] Re: Exceptional inheritance patterns
- Next message: [Python-Dev] Python in Unicode context
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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> ? 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
Probably inertia and compatibility issues (2.2 must've been brand new when you proposed that). I've become swayed by Paul Prescod's recent argument that exceptions use subclassing for classification reasons and that there's nothing wrong with requiring them to subclass some common base class.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Re: Exceptional inheritance patterns
- Next message: [Python-Dev] Python in Unicode context
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]