Skip to content

Docs: Use arguments to replace args in argparse.rst #135510

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yzi-Li
Copy link
Contributor

@Yzi-Li Yzi-Li commented Jun 14, 2025

@StanFromIreland
Copy link
Contributor

Should this be done, it is a bit churny, though it also has benefits, and aligns with other current devguide guidelines (i.e. don't use Latin abbreviations)? This is not a single occurrence, however:

c-api/call.rst:the arguments to an args tuple and kwargs dict anyway, then there is no point
c-api/call.rst:| Function                                 | callable         | args               | kwargs        |
library/tkinter.ttk.rst:      is specified then it is called with args if widget state matches
library/imaplib.rst:   Execute command args with messages identified by UID, rather than message
library/queue.rst:   Put *item* into the queue.  If optional args *block* is true and *timeout* is
library/queue.rst:   Remove and return an item from the queue.  If optional args *block* is true and
library/queue.rst:   The optional args *block* and *timeout* are ignored and only provided
library/queue.rst:   Remove and return an item from the queue.  If optional args *block* is true and
library/cmd.rst:   completing of commands args is done by calling :meth:`!complete_foo` with
library/string.rst:      passed to vformat.  The set of unused args can be calculated from these
library/argparse.rst:* ``'+'``. Just like ``'*'``, all command-line args present are gathered into a
library/argparse.rst:     >>> # parse the args and call whatever function was selected
library/argparse.rst:     >>> # parse the args and call whatever function was selected
library/unittest.mock-examples.rst:``side_effect`` will be called with the same args as the mock. This gives us an
library/multiprocessing.rst:      Remove and return an item from the queue.  If optional args *block* is
library/test.rst:   *kw* is extra keyword args to pass to :func:`subprocess.Popen`. Returns a
tutorial/errors.rst:   ...     print(inst)          # __str__ allows args to be printed directly,
using/configure.rst:   optimization configure args + the CPU architecture, and not all combinations

@Yzi-Li Yzi-Li changed the title Docs: Use arguments to replace argument in argparse.rst Docs: Use arguments to replace args in argparse.rst Jun 15, 2025
@Yzi-Li
Copy link
Contributor Author

Yzi-Li commented Jun 15, 2025

Just in this file (argparse.rst), only this one needs to be changed. ">>> # parse the args and call whatever function was selected" is a comment, "args" refer to the variable args.

OTOH, we use "All command-line arguments present are gathered into a list." just in the previous item *.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants