closure_namedarg.py 127 B

123456789
  1. # test passing named arg to closed-over function
  2. def f():
  3. x = 1
  4. def g(z):
  5. print(x, z)
  6. return g
  7. f()(z=42)