Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38a5beb commit 20ccda0Copy full SHA for 20ccda0
1 file changed
Doc/library/argparse.rst
@@ -1123,6 +1123,9 @@ is used when no command-line argument was present::
1123
>>> parser.parse_args([])
1124
Namespace(foo=42)
1125
1126
+For required_ arguments, the ``default`` value is ignored. For example, this
1127
+applies to positional arguments with nargs_ values other than ``?`` or ``*``,
1128
+or optional arguments marked as ``required=True``.
1129
1130
Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if the
1131
command-line argument was not present::
0 commit comments