summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/closure_defargs.py
blob: 96b1092659077d5f6e00d509bd55f0f0be24509f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# test closure with default args

def f():
    a = 1
    def bar(b = 10, c = 20):
        print(a + b + c)
    bar()
    bar(2)
    bar(2, 3)

print(f())