]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-59317: Improve parsing optional positional arguments in argparse (GH-124303...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 7 Oct 2024 21:24:31 +0000 (23:24 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Oct 2024 21:24:31 +0000 (00:24 +0300)
commit16127de2eb1a3dae56326560952c9b49f547cb3e
tree3af96718acfb58418cfd58ede6c09ad06538cf14
parent03ae82d0d34649d1fcb755015aa567fe3978d4f9
[3.13] gh-59317: Improve parsing optional positional arguments in argparse (GH-124303) (GH-124436)

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]