Blame view

test/test_lambda.py 119 Bytes
d73bf339   Alexandre Schulz   first commit
1
2
3
4
5
6
7
8
9
10
11


def foo(x):
    print(x)

funcs=[]
for i in range(10):
    funcs.append(lambda i=i: foo(i))

for f in funcs:
    f()