Unverified Kaydet (Commit) cbbf7461 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) GitHub

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.
(cherry picked from commit 04e82934)
Co-authored-by: 's avatarsuic86 <marko.gabriel.cz@gmail.com>
üst 4dc3c8ff
......@@ -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`:
......
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