aboutsummaryrefslogtreecommitdiff
path: root/tests/basics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics')
-rw-r--r--tests/basics/closure_namedarg.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/closure_namedarg.py b/tests/basics/closure_namedarg.py
new file mode 100644
index 000000000..5c0c451d1
--- /dev/null
+++ b/tests/basics/closure_namedarg.py
@@ -0,0 +1,9 @@
+# test passing named arg to closed-over function
+
+def f():
+ x = 1
+ def g(z):
+ print(x, z)
+ return g
+
+f()(z=42)