MCPcopy Create free account
hub / github.com/DasyDong/developer-roadmap / func

Function func

code/run_legb.py:8–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def func():
9 fun_lambda_list = []
10 for i in range(4):
11
12 def lambda_(x):
13 print('Lambda函数中 i {} 命名空间为:{}:'.format(i, locals()))
14 return x*i
15 fun_lambda_list.append(lambda_)
16 print('外层函数 I 为:{} 命名空间为:{}'.format(i, locals()))
17
18 return fun_lambda_list
19
20
21def test_legb_func():

Callers 1

test_legb_funcFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_legb_funcFunction · 0.68