René's URL Explorer Experiment


Title: gh-110131: Document how a non-empty default works with append and extend by v0ropaev · Pull Request #158155 · python/cpython · GitHub

Open Graph Title: gh-110131: Document how a non-empty default works with append and extend by v0ropaev · Pull Request #158155 · python/cpython

X Title: gh-110131: Document how a non-empty default works with append and extend by v0ropaev · Pull Request #158155 · python/cpython

Description: Closes #110131. @serhiy-storchaka already settled what this is: the behavior is correct and pretty straightforward. Reclassified this issue as the documentation issue. So this only touches the docs. Two things were off. The append section explains that a non-empty default is kept and command-line values are appended after it, but it says "the parsed value" without saying whose, which reads as if it were about the list being appended to rather than the option's final value. That now says "the parsed value for the option". The extend section had no such note at all, even though it behaves identically: >>> p.add_argument('--foo', action='extend', nargs='+', default=['0']) >>> p.parse_args(['--foo', '1', '2']) Namespace(foo=['0', '1', '2']) Same shape as append, and the surprise in the issue is the same one, so the same note now appears there. A test pins both, since the whole point is that the documented behaviour is the real one and nobody had written it down. ./python.exe -m test test_argparse is 1,978 passing. Docs plus one test, no behaviour change, so no news entry. Issue: gh-110131

Open Graph Description: Closes #110131. @serhiy-storchaka already settled what this is: the behavior is correct and pretty straightforward. Reclassified this issue as the documentation issue. So this only touches the do...

X Description: Closes #110131. @serhiy-storchaka already settled what this is: the behavior is correct and pretty straightforward. Reclassified this issue as the documentation issue. So this only touches the do...

Opengraph URL: https://github.com/python/cpython/pull/158155

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f742ee1a-fd02-df30-e30b-61f7621034e4
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9C24:3B07B3:483EBA:5AE0C8:6B02001A
html-safe-noncea0e4fc0d934728c45c85fc37f6c54bca47229c4c14c0c71addc16ddbf554cf16
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzI0OjNCMDdCMzo0ODNFQkE6NUFFMEM4OjZCMDIwMDFBIiwidmlzaXRvcl9pZCI6IjE1MDUzNjYyMTM0NzQyNTQ4NzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac16b3b08673f8fa75e5726366d8f175f41f63a9e185844ebfd330a2f17bfa30bf
hovercard-subject-tagpull_request:4636125695
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/158155/files
twitter:imagehttps://avatars.githubusercontent.com/u/144015565?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/144015565?s=400&v=4
og:image:altCloses #110131. @serhiy-storchaka already settled what this is: the behavior is correct and pretty straightforward. Reclassified this issue as the documentation issue. So this only touches the do...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/158155/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F158155%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F158155%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/158155/files
Reloadhttps://github.com/python/cpython/pull/158155/files
Reloadhttps://github.com/python/cpython/pull/158155/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
savannahostrowskihttps://github.com/savannahostrowski
python:mainhttps://github.com/python/cpython/tree/main
v0ropaev:gh-110131-argparse-append-defaulthttps://github.com/v0ropaev/cpython/tree/gh-110131-argparse-append-default
Conversation 13 https://github.com/python/cpython/pull/158155
Commits 6 https://github.com/python/cpython/pull/158155/commits
Checks 35 https://github.com/python/cpython/pull/158155/checks
Files changed https://github.com/python/cpython/pull/158155/files
Please reload this pagehttps://github.com/python/cpython/pull/158155/files
gh-110131: Document how a non-empty default works with append and extend https://github.com/python/cpython/pull/158155/files#top
Show all changes 6 commits https://github.com/python/cpython/pull/158155/files
93406f1 gh-110131: Document argparse's extend action with a non-empty default v0ropaev Sep 25, 2026 https://github.com/python/cpython/pull/158155/commits/93406f1959874bf6309eedddf779c521d3219ee4
94bd220 gh-110131: Test argparse's extend action with a non-empty default v0ropaev Sep 25, 2026 https://github.com/python/cpython/pull/158155/commits/94bd220a0fb89007a41ff6c9601c0f8536213433
5f7766c gh-110131: Restore the "for the option" scope in argparse's append docs v0ropaev Sep 25, 2026 https://github.com/python/cpython/pull/158155/commits/5f7766cb0c71689aa698c212b9eeaaa3f74ed4cd
02246d2 gh-110131: Drop the test, show a non-empty default in the example v0ropaev Sep 25, 2026 https://github.com/python/cpython/pull/158155/commits/02246d2c6cba9ce55aaa5eea2c1b54c386baa1b2
844bb63 gh-110131: Keep one extend example v0ropaev Sep 26, 2026 https://github.com/python/cpython/pull/158155/commits/844bb6313a9f0782a5a8aff2d59c31c8d5bcbe24
0bf4083 Merge branch 'main' into gh-110131-argparse-append-default savannahostrowski Sep 28, 2026 https://github.com/python/cpython/pull/158155/commits/0bf408329a46d776082f98fd1b775c3cba4b7ebc
Clear filters https://github.com/python/cpython/pull/158155/files
Please reload this pagehttps://github.com/python/cpython/pull/158155/files
Please reload this pagehttps://github.com/python/cpython/pull/158155/files
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L369
Doc/library/argparse.rsthttps://github.com/python/cpython/pull/158155/files#diff-76a105efd5acb88546c093f1d7f5d22d1d7908060dc46aa3d7c4499142720ec7
View file https://github.com/v0ropaev/cpython/blob/0bf408329a46d776082f98fd1b775c3cba4b7ebc/Doc/library/argparse.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/158155/{{ revealButtonHref }}
https://github.com/python/cpython/pull/158155/files#diff-76a105efd5acb88546c093f1d7f5d22d1d7908060dc46aa3d7c4499142720ec7
https://github.com/python/cpython/pull/158155/files#diff-76a105efd5acb88546c093f1d7f5d22d1d7908060dc46aa3d7c4499142720ec7
https://github.com/python/cpython/pull/158155/files#diff-76a105efd5acb88546c093f1d7f5d22d1d7908060dc46aa3d7c4499142720ec7
Please reload this pagehttps://github.com/python/cpython/pull/158155/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.