Skip to content

Commit fe40431

Browse files
committed
pythongh-95468: add more narg options
1 parent e016060 commit fe40431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/argparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2455,7 +2455,7 @@ def parse_known_intermixed_args(self, args=None, namespace=None):
24552455
# ========================
24562456
def _get_values(self, action, arg_strings):
24572457
# for everything but PARSER, REMAINDER args, strip out first '--'
2458-
if action.nargs not in [PARSER, REMAINDER, ONE_OR_MORE]:
2458+
if action.nargs not in [PARSER, REMAINDER, ZERO_OR_MORE, ONE_OR_MORE]:
24592459
try:
24602460
arg_strings.remove('--')
24612461
except ValueError:

0 commit comments

Comments
 (0)