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 7c9bbaa commit b4b182aCopy full SHA for b4b182a
Doc/library/argparse.rst
@@ -1122,6 +1122,9 @@ is used when no command-line argument was present::
1122
>>> parser.parse_args([])
1123
Namespace(foo=42)
1124
1125
+For required_ arguments, the ``default`` value is ignored. For example, this
1126
+applies to positional arguments with nargs_ values other than ``?`` or ``*``,
1127
+or optional arguments marked as ``required=True``.
1128
1129
Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if the
1130
command-line argument was not present::
0 commit comments