def fun(a, b, c, d):
print('a:', a, 'b:', b, 'c:', c, 'd:', d)
por que este funciona
fun(3, 7, d=10, *(23,))
e imprime:
a: 3 b: 7 c: 23 d: 10
mientras esto
fun(3, 7, c=10, *(23,))
no
Traceback (most recent call last):
File "/home/lookash/PycharmProjects/PythonLearning/learning.py", line 10, in <module>
fun(3, 7, c=10, *(23,))
TypeError: fun() got multiple values for argument 'c'
python
unpack
argument-unpacking
Łukasz
fuente
fuente
SyntaxError: positional argument follows keyword argument
.