Skip to content

gh-66419: Make optional arguments with nargs=REMAINDER consume all arguments - #124509

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:argparse-optional-remainder
Mar 18, 2026
Merged

gh-66419: Make optional arguments with nargs=REMAINDER consume all arguments#124509
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:argparse-optional-remainder

Conversation

@serhiy-storchaka

@serhiy-storchakaserhiy-storchaka commented Sep 25, 2024

Copy link
Copy Markdown
Member

…all arguments
It no longer stops at the first '--'.

@savannahostrowskisavannahostrowski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small comment for the news entry but LGTM so long as we don't backport!

Comment threadMisc/NEWS.d/next/Library/2024-09-25-12-47-50.gh-issue-66419.DVSukU.rst Outdated
…SukU.rst
Co-authored-by: Savannah Ostrowski <savannah@python.org>
@serhiy-storchaka
serhiy-storchaka merged commit 70c7e04 into python:mainMar 18, 2026
47 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the argparse-optional-remainder branch March 18, 2026 15:04
@serhiy-storchaka

Copy link
Copy Markdown
MemberAuthor

Thank you for your review @savannahostrowski.

ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

argparse not including '--' arguments in previous optional REMAINDER argument

2 participants

@serhiy-storchaka@savannahostrowski