Title: Clarify argparse action documentation · Issue #141963 · python/cpython · GitHub
Open Graph Title: Clarify argparse action documentation · Issue #141963 · python/cpython
X Title: Clarify argparse action documentation · Issue #141963 · python/cpython
Description: Documentation The documentation for several of argparse's actions could be improved to be shorter and clearer. For specific examples: 'store_true' and 'store_false' - These are special cases of 'store_const' used for storing the values T...
Open Graph Description: Documentation The documentation for several of argparse's actions could be improved to be shorter and clearer. For specific examples: 'store_true' and 'store_false' - These are special cases of 'st...
X Description: Documentation The documentation for several of argparse's actions could be improved to be shorter and clearer. For specific examples: 'store_true' and 'store_false' - These are ...
Opengraph URL: https://github.com/python/cpython/issues/141963
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Clarify argparse action documentation","articleBody":"# Documentation\n\nThe documentation for several of argparse's actions could be improved to be shorter and clearer.\n\nFor specific examples:\n\n> 'store_true' and 'store_false' - These are special cases of 'store_const' used for storing the values True and False respectively. In addition, they create default values of False and True respectively:\n\nThe `In addition` part is clunky.\n\n> 'append_const' - This stores a list, and appends the value specified by the [const](https://docs.python.org/3/library/argparse.html#const) keyword argument to the list; note that the [const](https://docs.python.org/3/library/argparse.html#const) keyword argument defaults to None. The 'append_const' action is typically useful when multiple arguments need to store constants to the same list. For example:\n\nThis could be shorter.\n\n> 'extend' - This stores a list and appends each item from the multi-value argument list to it. The 'extend' action is typically used with the [nargs](https://docs.python.org/3/library/argparse.html#nargs) keyword argument value '+' or '*'. Note that when [nargs](https://docs.python.org/3/library/argparse.html#nargs) is None (the default) or '?', each character of the argument string will be appended to the list. Example usage:\n\nThis sentence feels convoluted\n\n> 'count' - This counts the number of times a keyword argument occurs. For example, this is useful for increasing verbosity levels:\n\nThe argument parsed by argparse is not specifically a keyword argument; this seems like a copy-paste error for the times it's referring to `add_argument`'s args, as opposed to an argument parsed by argparse.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-141964\n* gh-142076\n* gh-142077\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/moshekaplan","@type":"Person","name":"moshekaplan"},"datePublished":"2025-11-26T04:28:14Z","url":"https://github.com/python/cpython/issues/141963"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1f1cc370-d420-477a-a32f-8fd66f3fc29f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A89E:17FB7:325BAD2:3FE0AF6:6B020716 |
| html-safe-nonce | 9cf8eaee33efc8fa4dc8a6c44e5805311633a7a55a8a2a6eda1f8097d657b69e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODlFOjE3RkI3OjMyNUJBRDI6M0ZFMEFGNjo2QjAyMDcxNiIsInZpc2l0b3JfaWQiOiI2OTkyMDUzMjk2MjA2ODQxNjIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | feb953d7707164262d0e22100301fbe401aea2fb8fd47a0ddcb582b128243dee |
| hovercard-subject-tag | issue:3665694104 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/141963/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04b0e077d539d24ba1b430af01e0878e1baba8e942eaacc5cb1da1849040d884/python/cpython/issues/141963 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04b0e077d539d24ba1b430af01e0878e1baba8e942eaacc5cb1da1849040d884/python/cpython/issues/141963 |
| og:image:alt | Documentation The documentation for several of argparse's actions could be improved to be shorter and clearer. For specific examples: 'store_true' and 'store_false' - These are special cases of 'st... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | moshekaplan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width