-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-137988: Fix const description in argparse.add_argument() docs #138315
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
gh-137988: Fix const description in argparse.add_argument() docs #138315
Conversation
Hi, just checking in on this PR — would really appreciate it if you could take a look whenever you get a chance. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! LGTM!
Thanks @PrinceNaroliya for the PR, and @savannahostrowski for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
pythonGH-138315) (cherry picked from commit 37425fe) Co-authored-by: PrinceNaroliya <[email protected]> Co-authored-by: Savannah Bailey <[email protected]>
pythonGH-138315) (cherry picked from commit 37425fe) Co-authored-by: PrinceNaroliya <[email protected]> Co-authored-by: Savannah Bailey <[email protected]>
GH-139051 is a backport of this pull request to the 3.14 branch. |
GH-139052 is a backport of this pull request to the 3.13 branch. |
…cs (GH-138315) (#139051) Co-authored-by: PrinceNaroliya <[email protected]> Co-authored-by: Savannah Bailey <[email protected]>
…cs (GH-138315) (#139052) Co-authored-by: PrinceNaroliya <[email protected]> Co-authored-by: Savannah Bailey <[email protected]>
What does this PR do?
This PR fixes a documentation issue in the
argparse
module related to theadd_argument()
method when usingnargs='?'
.Previously, the docs stated:
This is incorrect. The correct behavior is:
This PR updates the documentation to reflect the correct behavior.
Related Issue
Fixes: #137988
Type of Change
How to Verify
Open
Doc/library/argparse.rst
.Locate the passage describing
nargs='?'
andconst
.Confirm the updated sentence is:
"the value from
const
will be used."Build HTML docs (optional) to verify changes:
Checklist
📚 Documentation preview 📚: https://cpython-previews--138315.org.readthedocs.build/