simplify

Annotated tests/raise.py

285:6f583cfa39a5
2008-07-13 Paul Boddie Commit long uncommitted changes.
paulb@117 1
class E:
paulb@117 2
    def __init__(self, x):
paulb@117 3
        pass
paulb@117 4
class F:
paulb@111 5
    def __init__(self, x):
paulb@111 6
        pass
paulb@111 7
paulb@111 8
tb = None # NOTE: Traceback not supported yet.
paulb@111 9
x = 1
paulb@111 10
paulb@117 11
def f(x):
paulb@117 12
    raise E, x
paulb@117 13
paulb@117 14
def g(x):
paulb@117 15
    try:
paulb@117 16
        raise F(x)
paulb@117 17
    except:
paulb@117 18
        pass
paulb@117 19
paulb@117 20
def h(x, tb):
paulb@117 21
    try:
paulb@117 22
        raise F, x, tb
paulb@117 23
    except:
paulb@117 24
        pass
paulb@117 25
paul@5 26
try:
paulb@117 27
    f(x)
paulb@117 28
    g(x)
paulb@117 29
    h(x, tb)
paul@5 30
except:
paul@5 31
    pass