summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/argparse.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index f22aeb8..53ecc97 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1123,6 +1123,9 @@ is used when no command-line argument was present::
>>> parser.parse_args([])
Namespace(foo=42)
+For required_ arguments, the ``default`` value is ignored. For example, this
+applies to positional arguments with nargs_ values other than ``?`` or ``*``,
+or optional arguments marked as ``required=True``.
Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if the
command-line argument was not present::