summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-04-11 19:05:52 (GMT)
committerGitHub <noreply@github.com>2018-04-11 19:05:52 (GMT)
commite98e3385f2acfc6d98f70f8e66c96b752d003b8f (patch)
tree3747c713b7a16b9423d9489476686f60bf0d4589
parent910d71b839755baa31258bcc083be9191563819e (diff)
downloadcpython-e98e3385f2acfc6d98f70f8e66c96b752d003b8f.zip
cpython-e98e3385f2acfc6d98f70f8e66c96b752d003b8f.tar.gz
cpython-e98e3385f2acfc6d98f70f8e66c96b752d003b8f.tar.bz2
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 f97c59a in 2011. (cherry picked from commit 04e82934659487ecae76bf4a2db7f92c8dbe0d25) Co-authored-by: suic86 <marko.gabriel.cz@gmail.com>
-rw-r--r--Doc/library/argparse.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index 27c7ba5..c5bc1ee 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -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`: