[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Roundup Robot added the comment: New changeset 9192c0798a90 by Zachary Ware in branch '3.3': Issue #18326: Clarify that list.sort's arguments are keyword-only. http://hg.python.org/cpython/rev/9192c0798a90 New changeset 3f1c332c5e2e by Zachary Ware in branch 'default': Issue #18326: merge with 3.3 http://hg.python.org/cpython/rev/3f1c332c5e2e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Changes by Zachary Ware zachary.w...@gmail.com: -- assignee: docs@python - zach.ware resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Ezio Melotti added the comment: I think v2 is enough, but v3 is fine with me if people think v3 it's better. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Zachary Ware added the comment: Any further thoughts on this? I think my vote is for v3, except s/must/can only/. must makes it sound like you are forced to pass those arguments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Zachary Ware added the comment: How about a combination of the two? It's still short, but gets the point across without assuming the reader knows exactly what 'keyword-only argument' or requiring further reading, while introducing the term and providing the link for deeper understanding. (Here's the relevant change in this patch, the rest is the same:) + :meth:`sort` accepts two arguments that must be passed by keyword + (:ref:`keyword-only arguments keyword-only_parameter`): -- Added file: http://bugs.python.org/file31440/issue18326.v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
R. David Murray added the comment: In this expository context, I prefer the issue18326.that.diff version, but the index link to the keyword-only_parameter ref should still be added to it (on only be passed by keyword). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Zachary Ware added the comment: How about this? -- Added file: http://bugs.python.org/file31385/issue18326.v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Ezio Melotti added the comment: keyword-only is a well-established term, and I think it's better to use it and possibly make it a link to the parameter entry of the glossary. -- nosy: +ezio.melotti stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Terry J. Reedy added the comment: 'keyword argument' refers one to 'argument'. The entry for the latter says that there are only two types of arguments, keyword and positional. That is true as to how actual arguments are passed. There are 3 possibilities for how a single argument for a parameter might be passed: standard - positional or keyword positional only (args for many C functions, not specifically indicated) keyword only (follow '*' or '*args' after signature. These are explained in the parameter entry. Keyword-only parameters have to be matched by keyword arguments. I think it a bit misleading to say There are two types of arguments. That actually means There are two ways of passing an argument. Precede it by 'name=' or not. An object is the same whether passed by name or position. Calling a name a keyword in this context is also misleading since 'keyword' otherwise means a reserved word that cannot be used as a name. Using an actual keyword to name an argument is illegal: 'for = 2' raises. -- nosy: +terry.reedy title: Mention keywork only in list.sort docs - Mention 'keyword only' for list.sort, improve glossary. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Zachary Ware added the comment: How about this patch? I agree that types of arguments/parameters has great potential for confusion, so the glossary has been changed to kinds of argument/parameter (dropping the pluralization as well; it is unnecessary). I think just taking the word type out of it makes the rest of each entry unambiguous. To list.sort, I simply added a line: :meth:`sort` accepts two arguments which can only be passed by keyword:. I considered making each parameter's description an indented block after that, but that seems like more change than is really necessary, and the patched version doesn't look too bad to me. -- keywords: +patch nosy: +zach.ware Added file: http://bugs.python.org/file30781/issue18326.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Terry J. Reedy added the comment: The new 'which' should be 'that'. Other than that, looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18326] Mention 'keyword only' for list.sort, improve glossary.
Changes by Zachary Ware zachary.w...@gmail.com: Added file: http://bugs.python.org/file30785/issue18326.that.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com