R: [Python-Dev] Deprecating string exceptions
Barry A. Warsaw
barry@zope.com
2002年3月28日 11:48:55 -0500
>>>>> "SM" == Skip Montanaro <skip@pobox.com> writes:
>> * I'm not saying you can't use "except:". I'm not advocating a
>> semantic change to the meaning of "except:". (I am suggesting
>> that KeyboardInterrupt should not inherit from StandardError.)
>> I'm saying that the recommended usage for application
>> programmers should be to avoid it.
Guido> Sorry. I told you I hadn't read the thread the first time
Guido> around.
SM> So, do we agree on this point?
There's definitely precedence for that, and I think you could argue
that a KeyboardInterrupt isn't an error the same way SystemExit and
StopIteration aren't errors. I worry about backwards compatibility,
but I'll add this to the UPITS[1] Exception PEP
(Does anybody else lament the lack of an inheritance diagram in the
exceptions module documentation?)
-Barry
[1] Uber Py-In-The-Sky