
Guido van Rossum wrote:
[...]
Before we waste more time on this, let me explain why I like the rule that all exception classes be derived from Exception. It's only a vague liking, and maybe it's not worth making it a rule. I like it because including Exception (or one of its well-known subclasses) in the base class is a clue to the reader that a particular class declaration is used as an exception. AFAIK this is the only reason why Java has a similar rule; C++ does not, and lets you throw any class.
I can't see any implementation benefits from the requirement.
The traceback object could be part of the exception object, just like Java does it. When we have an exception that wraps another exception, both tracebacks would then be available. That's not exactly an implementation benefit, but an application benefit. -- Walter Dörwald · LivingLogic AG, Bayreuth/Germany · www.livinglogic.de