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

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

Yzi-Li
Copy link
Contributor

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

@StanFromIreland
Copy link
Member

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 *.

@ZeroIntensity ZeroIntensity added skip issue needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jun 23, 2025
Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is worth doing. If there are more occurences of this, let's make an issue and do it in a broader manner. But for now, I'll land this. Thanks!

@ZeroIntensity ZeroIntensity merged commit caad163 into python:main Jun 23, 2025
41 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Jun 23, 2025
@miss-islington-app
Copy link

Thanks @Yzi-Li for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 23, 2025
…35510)

(cherry picked from commit caad163b691b2343d823541cfbf741f481ee9f3e)

Co-authored-by: Yongzi Li <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 23, 2025
…35510)

(cherry picked from commit caad163)

Co-authored-by: Yongzi Li <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jun 23, 2025

GH-135866 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 23, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jun 23, 2025

GH-135867 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 23, 2025
ZeroIntensity pushed a commit that referenced this pull request Jun 23, 2025
…135510) (GH-135867)

Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
(cherry picked from commit caad163)

Co-authored-by: Yongzi Li <[email protected]>
ZeroIntensity pushed a commit that referenced this pull request Jun 23, 2025
…135510) (GH-135866)

Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
(cherry picked from commit caad163)

Co-authored-by: Yongzi Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants