-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Parameter's error messages say argument
instead of parameter
#133379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Formally speaking, here we indeed need to use "parameter" and not "argument". However, we only change error messages in the latest version to reduce breakage possibilities (thus, I don't think we'll backport this) |
…33382) The right term is "parameters".
Thank you for your report, @hyperkai. It's amazing how long we ignored this mistake. Thank you for your PR, @StanFromIreland. |
There are other error messages using def func(*args1, *args2): pass
# SyntaxError: * argument may appear only once
def func(**kwargs, *args): pass
# SyntaxError: arguments cannot follow var-keyword argument
def func(*args=["John"]): pass
# SyntaxError: var-positional argument cannot have default value
def func(**kwargs={"name":"John"}): pass
# SyntaxError: var-keyword argument cannot have default value |
You need to pull the latest commits and build again. |
Bug report
Bug description:
Setting the same name parameters gets the error message saying
duplicate argument
as shown below:Setting
*
after all the parameters gets the error message sayingat least one argument
as shown below:So,
argument
should be replaced withparameter
as shown below:*You can also see this issue.
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Linked PRs
arguments
in error messages #133382The text was updated successfully, but these errors were encountered: