mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
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 commitf97c59a
in 2011. (cherry picked from commit04e8293465
) Co-authored-by: suic86 <marko.gabriel.cz@gmail.com>
This commit is contained in:
parent
4dc3c8ff14
commit
cbbf746186
1 changed files with 2 additions and 2 deletions
|
@ -712,7 +712,7 @@ be positional::
|
|||
Namespace(bar='BAR', foo='FOO')
|
||||
>>> parser.parse_args(['--foo', 'FOO'])
|
||||
usage: PROG [-h] [-f FOO] bar
|
||||
PROG: error: too few arguments
|
||||
PROG: error: the following arguments are required: bar
|
||||
|
||||
|
||||
action
|
||||
|
@ -898,7 +898,7 @@ values are:
|
|||
Namespace(foo=['a', 'b'])
|
||||
>>> parser.parse_args([])
|
||||
usage: PROG [-h] foo [foo ...]
|
||||
PROG: error: too few arguments
|
||||
PROG: error: the following arguments are required: foo
|
||||
|
||||
.. _`argparse.REMAINDER`:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue