Gerard Flanagan wrote: > Would a decorator work here? Depends on how you want to use that functionality. In my use case I only need to catch the excpetion once.
Note that in your code the exception has not the right type which is
what I targeted in my last posting. I.e. the following will raise an
Exception if function is decorated:
try:
print funktion()
except ArithmeticError:
pass
-- Chris
--
http://mail.python.org/mailman/listinfo/python-list
