Setting two * to a function gets the error message saying * argument as shown below:
def func(*, *, param1, param2): pass
SyntaxError: * argument may appear only once
Setting * after all the parameters gets the error message saying named arguments as shown below:
def func(param1, param2, *): pass
SyntaxError: named arguments must follow bare *
So, argument should be replaced with parameter as shown below:
SyntaxError: duplicate parameter 'param' in function definition
SyntaxError: named parameters must follow bare *
*You can also see this issue.
3.12
Linux
I think it's better to reuse the same issue as before where we could fix usages instead of having multiple issues for the same error.
For *, we should say "* marker" (or separator, idk) instead (it's not a parameter nor an argument IMO)
I can open a separate pr for this.
Yes, please
Let's do everything in the other PR/issue.
Activity
picnixz commented on May 5, 2025
I think it's better to reuse the same issue as before where we could fix usages instead of having multiple issues for the same error.
For *, we should say "* marker" (or separator, idk) instead (it's not a parameter nor an argument IMO)
StanFromIreland commented on May 5, 2025
I can open a separate pr for this.
picnixz commented on May 5, 2025
Yes, please
picnixz commented on May 9, 2025
Let's do everything in the other PR/issue.