We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 672d8b9 commit 78ef1b6Copy full SHA for 78ef1b6
Doc/library/argparse.rst
@@ -1162,8 +1162,8 @@ keyword argument to :meth:`~ArgumentParser.add_argument`::
1162
>>> parser.parse_args(['--foo', 'BAR'])
1163
Namespace(foo='BAR')
1164
>>> parser.parse_args([])
1165
- usage: argparse.py [-h] [--foo FOO]
1166
- argparse.py: error: option --foo is required
+ usage: [-h] --foo FOO
+ : error: the following arguments are required: --foo
1167
1168
As the example shows, if an option is marked as ``required``,
1169
:meth:`~ArgumentParser.parse_args` will report an error if that option is not
0 commit comments