From 55ca075cab5423df5a2a5893248a504cedcb16a8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 30 Mar 2014 17:35:53 +0300 Subject: vm: Implement CALL_FUNCTION_VAR opcode (foo(*(1, 2, 3))). --- tests/basics/fun-callstar.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/basics/fun-callstar.py (limited to 'tests') diff --git a/tests/basics/fun-callstar.py b/tests/basics/fun-callstar.py new file mode 100644 index 000000000..49b40d959 --- /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)) -- cgit v1.2.3