diff -r b7a4c076ba40 Lib/test/test_extcall.py --- a/Lib/test/test_extcall.py Tue Jun 07 01:08:48 2016 +0000 +++ b/Lib/test/test_extcall.py Fri Jun 10 16:14:52 2016 +0300 @@ -57,6 +57,10 @@ Here we add keyword arguments Traceback (most recent call last): ... TypeError: f() got multiple values for keyword argument 'a' + >>> f(1, 2, a=3, **{'a': 4}, **{'a': 5}) + Traceback (most recent call last): + ... + TypeError: f() got multiple values for keyword argument 'a' >>> f(1, 2, 3, *[4, 5], **{'a':6, 'b':7}) (1, 2, 3, 4, 5) {'a': 6, 'b': 7} >>> f(1, 2, 3, x=4, y=5, *(6, 7), **{'a':8, 'b': 9}) diff -r b7a4c076ba40 Lib/test/test_unpack_ex.py --- a/Lib/test/test_unpack_ex.py Tue Jun 07 01:08:48 2016 +0000 +++ b/Lib/test/test_unpack_ex.py Fri Jun 10 16:14:52 2016 +0300 @@ -248,6 +248,11 @@ Overridden parameters ... TypeError: f() got multiple values for keyword argument 'x' + >>> f(x=5, **{'x': 3}, **{'x': 2}) + Traceback (most recent call last): + ... + TypeError: f() got multiple values for keyword argument 'x' + >>> f(**{1: 3}, **{1: 5}) Traceback (most recent call last): ... diff -r b7a4c076ba40 Python/compile.c --- a/Python/compile.c Tue Jun 07 01:08:48 2016 +0000 +++ b/Python/compile.c Fri Jun 10 16:14:52 2016 +0300 @@ -3360,7 +3360,7 @@ compiler_call_helper(struct compiler *c, code |= 2; if (nsubkwargs > 1) { /* Pack it all up */ - int function_pos = n + (code & 1) + nkw + 1; + int function_pos = n + (code & 1) + 2*nkw + 1; ADDOP_I(c, BUILD_MAP_UNPACK_WITH_CALL, nsubkwargs | (function_pos << 8)); } }