| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…in the documentation
There was a problem hiding this comment.
I stopped at ast.rst for now.
Sorry, something went wrong.
| Indicates that the remaining arguments in the Python argument list are | ||
| keyword-only. Currently, all keyword-only arguments must also be optional | ||
| Indicates that the remaining arguments in the Python argument list can be | ||
| supplied only by keyword. Currently, all such arguments must also be optional |
There was a problem hiding this comment.
In the context of PyArg_ParseTupleAndKeywords, 'keyword' means 'parameter name' rather than 'syntax keyword. So I think Serhiy's revision could be left as is, or changed to
| supplied only by keyword. Currently, all such arguments must also be optional | |
| supplied only by parameter name. Currently, all such arguments must also be optional |
The keword-only definition is a bit circular. Perhaps by keyword should be changed to by parameter name to break the loop.
Sorry, something went wrong.
| formatting styles. The :class:`Formatter` class been enhanced to take an | ||
| additional, optional keyword parameter named ``style``. This defaults to | ||
| additional, optional keyword argument named ``style``. This defaults to |
There was a problem hiding this comment.
I think an alternative change, not necessarily better, would have been /take/have/.
Sorry, something went wrong.
|
When you're done making the requested changes, leave the comment: I have made the requested changes; please review again. |
Sorry, something went wrong.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
There was a problem hiding this comment.
Stopped at code.h.
Sorry, something went wrong.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
I have doubts about this massive sweep through the docs. The difference between parameter and argument is a technicality that disagrees with common usage. The norm is to refer to "keyword arguments" and to name the parameter "**kwargs". This is common in blog posts, docs, docstrings and it is what people search for. My opinion is that the utility and accessibility of our docs would be impaired by this global substitution. There are some places where it makes sense and some where is doesn't sound right. @nedbat The docs wg should take a look at this one. |
Sorry, something went wrong.
|
It is not so massive comparing with the size of the documentation. "Keyword arguments" is a correct term, this PR does nothing with it. "kwargs" is a nice name for var-keyword parameter, it will contain a dict of keyword arguments. If we fix the documentation now, there will be fewer errors in the future, because new small pieces of documentation are often written based on existing examples. |
Sorry, something went wrong.
|
ISTM this ventures far from how everyday Python programmers think, speak, and write about the language. The terms "keyword-only arguments" and "positional only arguments" are commonplace (including in PEP 3102). In Python books, at conferences, and in blog posts, I don't recall ever hearing "keyword-only parameters" or "positional only parameters." To my ear, that sounds foreign and discordant. This is a somewhat of a "sweeping PR" and hits 85 files, reversing the wording decisions made by many authors and their reviewers. The premise of the PR seems pedantic to me and at odds with the needs of our users. While I personally am careful when teaching Python to use "argument" and "parameter" precisely, most people do not draw a distinction and use "argument" for both. My opinion is that the PR mostly makes the docs less readable, searchable, and user friendly (though it would be worse if the even more precise term "formal parameter" was used everywhere). Keep in mind, that the PEPs went through. a heavy discussion phase and no one asked for the title to be changed. Also, the same terminology was used in whatsnew and throughout the docs. It is somewhat heavily vetted as reasonably clear speech and has been in the wild since 2006. We do not need to make this sweeping edit to well established text. Another thought is the that current terminology reflects a reasonable point of view that / and * are simply restrictions on how arguments may be passed. From that POV, they don't modify the parameters themselves. Accordingly, "positional-only" parameter doesn't make any sense. Also, there is another issue for users. While folks with a CS background tend to think arguments as being the values that get bound to parameters, other engineering disciplines use the term "parameters" to mean the values themselves (i.e. "we adjusted the parameters" or "parametric equations"). |
Sorry, something went wrong.
|
There is a dedicated FAQ entry for difference between arguments and parameters: See also definitions of terms argument and parameter in the glossary: In this PR you only see changes for incorrect use of terms argument and parameter, but you do not see when thay are used correctly. Some of fixed docs were written by me, it was not intentional, they were errors. If we fix existing errors in the documentation, this will reduce the number of future errors, because the authors will have less wrong examples. If you have any specific requests for changes, please point them out, we will discuss them or leave the concrete cases for future if they are ambiguous. But overall this PR fixes a lot of errors. |
Sorry, something went wrong.
|
@serhiy-storchaka The editorial board discussed this PR in our June meeting. Serhiy, we appreciate your effort. However, we recommend that the existing PR be closed. We discussed the following reasons to close the existing PR:
In addition, arguments vs parameters are covered in the FAQ. |
Sorry, something went wrong.
|
@jablonskidev, thank you for discussing this. But the result confuses me. There have been other issues about the misuse of the terms "argument" and "parameter", what should we answer this? If the terms "argument" and "parameter" are now considered the same, should not we remove the FAQ entry? I think this would be wrong, this would confuse and mislead users, especially beginners. |
Sorry, something went wrong.
We weren't trying to say that the terms are interchangeable and the same. We were saying that the distinction is not important enough to make sweeping changes. In addition, in some places there isn't agreement on which term is the correct one. When updating pages, it's fine to switch terms to be more accurate, but this isn't worth the churn it would cause. |
Sorry, something went wrong.
|
@serhiy-storchaka What would you like to do with this PR? |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--135160.org.readthedocs.build/