diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 10:33:46 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-02 10:33:46 +0300 |
commit | a9d40323166c43221f8a4f57170cb057f95ad2dc (patch) | |
tree | f32d0722a46b1c59d52029a97a541c8605e1b18e /Python/compile.c | |
parent | 535e8c2b858cefbfb8429eb36bb1cb7f55cc1f43 (diff) | |
download | cpython-a9d40323166c43221f8a4f57170cb057f95ad2dc.tar.gz |
Issue #28257: Improved error message when pass a non-iterable as
a var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c index 9502feef7c..c0c81e1228 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -987,9 +987,9 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg) return 1-oparg; case BUILD_LIST_UNPACK: case BUILD_TUPLE_UNPACK: + case BUILD_TUPLE_UNPACK_WITH_CALL: case BUILD_SET_UNPACK: case BUILD_MAP_UNPACK: - return 1 - oparg; case BUILD_MAP_UNPACK_WITH_CALL: return 1 - oparg; case BUILD_MAP: @@ -3549,7 +3549,7 @@ compiler_call_helper(struct compiler *c, if (nsubargs > 1) { /* If we ended up with more than one stararg, we need to concatenate them into a single sequence. */ - ADDOP_I(c, BUILD_TUPLE_UNPACK, nsubargs); + ADDOP_I(c, BUILD_TUPLE_UNPACK_WITH_CALL, nsubargs); } else if (nsubargs == 0) { ADDOP_I(c, BUILD_TUPLE, 0); |