-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Setting the same name parameters gets the error message saying duplicate argument
as shown below:
def func(param, param):
pass
SyntaxError: duplicate argument 'param' in function definition
Setting *
after all the parameters gets the error message saying at least one argument
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.
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error