aboutsummaryrefslogtreecommitdiff
path: root/tests/basics/return1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/return1.py')
-rw-r--r--tests/basics/return1.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/return1.py b/tests/basics/return1.py
new file mode 100644
index 000000000..7209d87ce
--- /dev/null
+++ b/tests/basics/return1.py
@@ -0,0 +1,13 @@
+# test return statement
+
+def f():
+ return
+print(f())
+
+def g():
+ return 1
+print(g())
+
+def f(x):
+ return 1 if x else 2
+print(f(0), f(1))