On Tue, 13 Nov 2007 06:17:26 -0300, Gabriel Genellina wrote:

> 
> A function?
> 
>       try:
>               code_block
>       except A:
>               handle_exception()

maybe

>>> def handle(f, *args, **kw):
...     try:
...             return f(*args, **kw)
...     except A:
...             handle_exception()

>>> def doSomething():
...    code_block
...
>>> handle(doSomething)

cheers
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to