diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-30 19:09:16 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-30 19:09:16 +0100 |
commit | f6a820903afe12760b27553831c3bdb16c50b985 (patch) | |
tree | 54c3f263a097c873fd9199419a0488c07edf42eb /tests | |
parent | 14b8203a99f2ee67cea86711631fc5d939afd540 (diff) | |
parent | 55ca075cab5423df5a2a5893248a504cedcb16a8 (diff) | |
download | micropython-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.py | 13 |
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)) |