summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/basics/fun_name.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/basics/fun_name.py b/tests/basics/fun_name.py
index 53ca93561..bb1f14992 100644
--- a/tests/basics/fun_name.py
+++ b/tests/basics/fun_name.py
@@ -22,3 +22,11 @@ try:
str((1).to_bytes.__name__)
except AttributeError:
pass
+
+# name of a function that has closed over variables
+def outer():
+ x = 1
+ def inner():
+ return x
+ return inner
+print(outer.__name__)