summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-30 19:09:16 +0100
committerDamien George <damien.p.george@gmail.com>2014-03-30 19:09:16 +0100
commitf6a820903afe12760b27553831c3bdb16c50b985 (patch)
tree54c3f263a097c873fd9199419a0488c07edf42eb /tests
parent14b8203a99f2ee67cea86711631fc5d939afd540 (diff)
parent55ca075cab5423df5a2a5893248a504cedcb16a8 (diff)
downloadmicropython-f6a820903afe12760b27553831c3bdb16c50b985.tar.gz
micropython-f6a820903afe12760b27553831c3bdb16c50b985.zip
Merge pull request #396 from pfalcon/call-star
vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))).
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/fun-callstar.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/fun-callstar.py b/tests/basics/fun-callstar.py
new file mode 100644
index 0000000000..49b40d9594
--- /dev/null
+++ b/tests/basics/fun-callstar.py
@@ -0,0 +1,13 @@
+def foo(a, b, c):
+ print(a, b, c)
+
+foo(*(1, 2, 3))
+foo(1, *(2, 3))
+foo(1, 2, *(3,))
+foo(1, 2, 3, *())
+
+# Another sequence type
+foo(1, 2, *[100])
+
+# Iterator
+foo(*range(3))