看这个例子(使用 python 2.7.6):
>>> def func(a, b, c, d):
print a, b, c, d
>>> func(1, c = 3, *(2,), **{'d':4})
1 2 3 4
到这里为止,还好。但是,为什么下面的调用失败了?
>>> func(1, b = 3, *(2,), **{'d':4})
Traceback (most recent call last):
File "<pyshell#69>", line 1, in <module>
func(1, b = 3, *(2,), **{'d':4})
TypeError: func() got multiple values for keyword argument 'b'