]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 7 Oct 2024 22:51:35 +0000 (00:51 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Oct 2024 22:51:35 +0000 (22:51 +0000)
commit0a046771c0b274356ff3d550401b009a9eff3a9a
tree14bc98d3f535f10f9e5319f55e279021eb2cc754
parentdb3ccd8b62c7ff9f1ce5a7d1b8e7d68eed09517f
[3.13] gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required (GH-124306) (#124421)

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
(cherry picked from commit 3c83f9958c14cd62ad8951c53536f7788745b0ba)

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