Kaydet (Commit) 04e82934 authored tarafından suic86's avatar suic86 Kaydeden (comit) Zachary Ware

Fix error messages in argparse examples (GH-6435)

The examples in argparse documentation use `error: too few arguments`
error message which was removed in this commit f97c59aa in 2011.
üst d08972fd
...@@ -712,7 +712,7 @@ be positional:: ...@@ -712,7 +712,7 @@ be positional::
Namespace(bar='BAR', foo='FOO') Namespace(bar='BAR', foo='FOO')
>>> parser.parse_args(['--foo', 'FOO']) >>> parser.parse_args(['--foo', 'FOO'])
usage: PROG [-h] [-f FOO] bar usage: PROG [-h] [-f FOO] bar
PROG: error: too few arguments PROG: error: the following arguments are required: bar
action action
...@@ -898,7 +898,7 @@ values are: ...@@ -898,7 +898,7 @@ values are:
Namespace(foo=['a', 'b']) Namespace(foo=['a', 'b'])
>>> parser.parse_args([]) >>> parser.parse_args([])
usage: PROG [-h] foo [foo ...] usage: PROG [-h] foo [foo ...]
PROG: error: too few arguments PROG: error: the following arguments are required: foo
.. _`argparse.REMAINDER`: .. _`argparse.REMAINDER`:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment