aboutsummaryrefslogtreecommitdiff
path: root/tests/basics
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics')
-rw-r--r--tests/basics/for_return.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/basics/for_return.py b/tests/basics/for_return.py
new file mode 100644
index 000000000..0441352ad
--- /dev/null
+++ b/tests/basics/for_return.py
@@ -0,0 +1,7 @@
+# test returning from within a for loop
+
+def f():
+ for i in [1, 2, 3]:
+ return i
+
+print(f())