"Guido" == Guido van Rossum firstname.lastname@example.org 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.
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/%7Eguido/)