Files
TencentOS-tiny/components/language/micropython/tests/basics/closure_namedarg.py
2022-09-29 12:10:37 +08:00

10 lines
127 B
Python

# test passing named arg to closed-over function
def f():
x = 1
def g(z):
print(x, z)
return g
f()(z=42)