R: [Python-Dev] Deprecating string exceptions
Martin v. Loewis
martin@v.loewis.de
28 Mar 2002 16:24:03 +0100
Guido van Rossum <guido@python.org> writes:
> I can't see any implementation benefits from the requirement. It
> sounds like you can't either
If the requirement was extended to disallow multiple root classes, it
would disambiguate the case of the class Z(str,Exception): It would be
an error to raise an exception of class Z. Classes that only inherit
from str would continue to operate as string exceptions, classes that
inherit from Exception would be caught by their type - you couldn't
have a class that is both.
Regards,
Martin