File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1447,12 +1447,12 @@ it exits and prints the error along with a usage message::
14471447 >>> # invalid option
14481448 >>> parser.parse_args(['--bar'])
14491449 usage: PROG [-h] [--foo FOO] [bar]
1450- PROG: error: no such option : --bar
1450+ PROG: error: unrecognized arguments : --bar
14511451
14521452 >>> # wrong number of arguments
14531453 >>> parser.parse_args(['spam', 'badger'])
14541454 usage: PROG [-h] [--foo FOO] [bar]
1455- PROG: error: extra arguments found : badger
1455+ PROG: error: unrecognized arguments: badger
14561456
14571457
14581458Arguments containing ``- ``
@@ -1489,7 +1489,7 @@ there are no options in the parser that look like negative numbers::
14891489 >>> # negative number options present, so -2 is an option
14901490 >>> parser.parse_args(['-2'])
14911491 usage: PROG [-h] [-1 ONE] [foo]
1492- PROG: error: no such option : -2
1492+ PROG: error: unrecognized arguments : -2
14931493
14941494 >>> # negative number options present, so both -1s are options
14951495 >>> parser.parse_args(['-1', '-1'])
You can’t perform that action at this time.
0 commit comments