[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib getopt.py,1.7,1.8
Guido van Rossum
guido@CNRI.Reston.VA.US
Tue, 21 Dec 1999 18:40:22 -0500
> >>>>> "Guido" == Guido van Rossum <guido@cnri.reston.va.us> writes:
>
> BAW> Or require that exception classes be derived from
> BAW> exceptions.Exception :)
>
> Guido> That's hard to require. But it could easily be a
> Guido> requirement checked by one of the hypothetical typecheckers
> Guido> that are being discussed in the types-sig.
>
> Hmm, the raise could probably enforce this, but it might not be that
> useful.
>
> -Barry
The raise could easily enforce this, but it would break lots of
existing code.
I wish I had done it right from the start -- then exceptions would
have been classes from the start and would have required inheritance
from the Exception base class. Like in Java. (And in C++?)
--Guido van Rossum (home page: http://www.python.org/~guido/)