Guido van Rossum email@example.com writes:
Legal, but not particularly useful. Anyway, I think that "derives from Exception" overrules "derives from str" here, so this should be allowed. Note that currently it creates a new-style class and thus it doesn't work.
What do you mean, it doesn't work?
exc = Z("Hallo") try:
... raise exc ... except exc: ... print "Gefangen" ... Gefangen