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

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Also, just to make it clear: changing this would be backwards incompatible, so if someone is interested, a bigger discussion is needed (starting with python-ideas/python-dev). -- ___ Python tracker

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

2021-08-16 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

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

2021-08-16 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is not a bug, check the thread that Serhiy attached. The grammar is, in principle, correct. For instance, you can do: def f(a,b,c): pass def wrapper(*args, **kw): return f(c=1, *args, **kw) wrapper(2,b=2) And you don't want that to be a

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

2021-08-16 Thread Irit Katriel
Irit Katriel added the comment: Reproduced in 3.11: >>> f(a=1, 2, 3) File "", line 1 f(a=1, 2, 3) ^ SyntaxError: positional argument follows keyword argument >>> f(a=1, *(2, 3)) Traceback (most recent call last): File "", line 1, in TypeError: f() got multiple values fo

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

2020-03-15 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

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

2018-10-13 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

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

2018-10-03 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2018-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See the thread "Order of positional and keyword arguments" on the Python-Dev mailing lists at 2018-04-26: https://mail.python.org/pipermail/python-dev/2018-April/153157.html -- nosy: +gvanrossum, serhiy.storchaka __

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

2018-10-03 Thread metaxm
New submission from metaxm : >>> def f(a, b, c): ... pass >>> f(a=1, 2, 3) SyntaxError: positional argument follows keyword argument >>> f(a=1, *(2, 3)) TypeError: f() got multiple values for argument 'a' f(a=1, 2, 3) will cause a SyntaxError, but f(a=1, *(2, 3)) will cause a TypeError. T