If all you wanted was some grouping of exceptions why not something
like...

soft_exception_list = [IndexError, TypeError]
hard_exception_list = [ZeroDivision]

try:
    do_something()
except Exception, e:
    if e.__class__ in soft_exception_list:
        handle_soft_exception()
    elif e.__class__ in hard_exception_list:
        handle_hard_exception()
    else:
        raise NotImplementedError

Granted you're most likely looking for something that does this
constantly on every line of code though...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to