[issue34882] f(a=1, *args) should be a SyntaxError

Irit Katriel report at bugs.python.org
Mon Aug 16 18:55:50 EDT 2021


Irit Katriel <iritkatriel at gmail.com> added the comment:

Reproduced in 3.11:

>>> f(a=1, 2, 3)
  File "<stdin>", line 1
    f(a=1, 2, 3)
               ^
SyntaxError: positional argument follows keyword argument
>>> f(a=1, *(2, 3))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: f() got multiple values for argument 'a'
>>>

----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34882>
_______________________________________


More information about the Python-bugs-list mailing list