Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
bpo-47054: Call params parameters not arguments in SyntaxErrors.#32014
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
A couple of SyntaxErrors were potentionally confusing in their wordingdue to the use of the term arguments when what it was referring arepedantically parameters as the errors happen at definition time.We unfortunately use the terms loosely in various parts of Python.https://stackoverflow.com/questions/156767/whats-the-difference-between-an-argument-and-a-parameter#:~:text=A%20parameter%20is%20the%20variable,function%20when%20it%20is%20called.
Wording questions to ponder: Are they "default parameters" or "keyword parameters" potentially with a "non-" prefix, or are they "parameters with a default" and "parameters without a default" or "naked parameters" or "lone parameters"? |
I'll update the golden value error message tests once we've agreed upon wording. |
The most verbose and explicit definition would be: "a parameter with a default argument". Afterall, it is a parameter that has a default argument that gets passed if there is no argument. You could shorten this to "a parameter with a default" (optionally including "value" at the end). Technically you could also say "defaulted parameter" (reads better) - because if no argument is passed the parameter is defaulted with a default argument - which would be even shorter. I do think "a keyword parameter" in the current changes might even be more confusing with a keyword-only parameter than the original saying of calling a parameter an argument though. |
Bluenix2 commentedMar 21, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Going off of my previous comment about a "defaulted parameter"; why not use "required parameter" for a parameter that lacks a default argument? Now not only will this PR be more technically accurate, it'll also make the error easier to read: - SyntaxError: non-default argument follows default argument+ SyntaxError: required parameter follows defaulted parameter ...alternatively (since there is still repetition)... - SyntaxError: non-default argument follows default argument+ SyntaxError: required parameter follows parameter with a default value I found myself tripping over the repetition of the previous error message and this should make it easy to tell the exact issue with the parameters. In the latter codeblock "value" could be replaced by "argument", either way it removes all repetition. |
Uh oh!
There was an error while loading.Please reload this page.
A couple of SyntaxErrors were potentionally confusing in their wording
due to the use of the term arguments when what it was referring are
pedantically parameters as the errors happen at definition time.
We unfortunately use the terms loosely in various parts of Python.
https://stackoverflow.com/questions/156767/whats-the-difference-between-an-argument-and-a-parameter#:~:text=A%20parameter%20is%20the%20variable,function%20when%20it%20is%20called.
https://bugs.python.org/issue47054