summaryrefslogtreecommitdiff
path: root/tests/internal_bench/var-9.4-except_selfinduced.py
blob: 544609ca4b6b31a855ead46ebd56f9dd43ffd1af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import bench


class Foo:
    pass


def test(num):
    o = Foo()

    def get():
        try:
            raise AttributeError
        except AttributeError:
            return num

    i = 0
    while i < get():
        i += 1


bench.run(test)