File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1541,12 +1541,12 @@ it exits and prints the error along with a usage message::
15411541 >>> # invalid option
15421542 >>> parser.parse_args(['--bar'])
15431543 usage: PROG [-h] [--foo FOO] [bar]
1544- PROG: error: no such option : --bar
1544+ PROG: error: unrecognized arguments : --bar
15451545
15461546 >>> # wrong number of arguments
15471547 >>> parser.parse_args(['spam', 'badger'])
15481548 usage: PROG [-h] [--foo FOO] [bar]
1549- PROG: error: extra arguments found : badger
1549+ PROG: error: unrecognized arguments: badger
15501550
15511551
15521552Arguments containing ``- ``
@@ -1583,7 +1583,7 @@ there are no options in the parser that look like negative numbers::
15831583 >>> # negative number options present, so -2 is an option
15841584 >>> parser.parse_args(['-2'])
15851585 usage: PROG [-h] [-1 ONE] [foo]
1586- PROG: error: no such option : -2
1586+ PROG: error: unrecognized arguments : -2
15871587
15881588 >>> # negative number options present, so both -1s are options
15891589 >>> parser.parse_args(['-1', '-1'])
You can’t perform that action at this time.
0 commit comments