]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-59317: Improve parsing optional positional arguments in argparse (GH-124303...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 24 Sep 2024 13:08:22 +0000 (15:08 +0200)
committerGitHub <noreply@github.com>
Tue, 24 Sep 2024 13:08:22 +0000 (13:08 +0000)
commit996e4094017f22660ad74f94d092f8ba2cc1675e
tree3b27545abaa6780d93f38c39036719fb8dc53f84
parented44377220b5b43f5463f420aba982dfe777a3ff
[3.12] gh-59317: Improve parsing optional positional arguments in argparse (GH-124303) (GH-124437)

Fix parsing positional argument with nargs equal to '?' or '*' if it is
preceded by an option and another positional argument.
(cherry picked from commit 4a5e4aade420c594c5b3fe0589e9e6b444bd6ee5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/next/Library/2024-09-21-19-02-37.gh-issue-59317.OAhNZZ.rst [new file with mode: 0644]