[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Current message same in 3.11 and 3.9, but I am not sure about backporting to old parser. However merges a change, if any, can decide. -- nosy: +pablogsal, terry.reedy stage: -> needs patch type: -> behavior versions: +Python 3.11 -Python 3.7,

[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-18 Thread Bluenix
Bluenix added the comment: Yes I agree, that would be the best. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-17 Thread Vedran Čačić
Vedran Čačić added the comment: The problem is more subtle. The thing is, "default parameter" doesn't make sense in this context. Yes, a and b are parameter, but a is not "default parameter" in any sensible way. It is _None_ which is the default argument for parameter a, while parameter b

[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-17 Thread Bluenix
New submission from Bluenix : Running the code below will produce a SyntaxError with the message: "non-default argument follows default argument". def test(a=None, b): return b if a is None else a The issue is that `a` and `b` aren't *arguments*, rather, they are *parameters*.