]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 24 Sep 2024 08:43:26 +0000 (10:43 +0200)
committerGitHub <noreply@github.com>
Tue, 24 Sep 2024 08:43:26 +0000 (11:43 +0300)
commit7e2d414a599782773f46eb8a20506db0cfa3dcce
treed7a975d913a3a2ed1214879784aa18121b9566ca
parent0e838b52fe323569138ac2f74979d99336067296
[3.12] gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required (GH-124306) (GH-124422)

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]