summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/try3.py
blob: 31bacd3b36edebf87a7bd55c3245f04f25496ecf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# nested exceptions

def f():
    try:
        foo()
    except:
        print("except 1")
        try:
            baz()
        except:
            print("except 2")
        bar()

try:
    f()
except:
    print("f except")