[Tutor] Script performance: Filtering email
Wed, 17 Jan 2001 10:30:44 -0000
> : (the body of your script)
> : raise # Re-raise the exception so that the program
> Would someone please explain the last line above about re-raising the
> exception? I don't understand what that does.
It simply prevents the exception handling stopping in your except.
The exception gets passed up to the next level and if not handled
there(or reraised again) eventually to the global handler which
generates a Python stack dump.
Normally an except clause handles the error in toto, but using
except makes it more like an interception whereby you add some
behavior. You might think of it as analogous to calling a
super class method in an OO situation.
# something else
A.foo(s) # similar effect to using raise in exception handler