Skip to content

Commit cfec1b0

Browse files
Fix line length
1 parent 1f9516a commit cfec1b0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/argparse.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,9 +1052,9 @@ is used when no command-line argument was present::
10521052
>>> parser.parse_args([])
10531053
Namespace(foo=42)
10541054

1055-
Because ``nargs='*'`` collects matched values into a list, an absent positional
1056-
argument yields an empty list (``[]``); a default of ``None`` is replaced by
1057-
``[]``, although any other default is used as given.
1055+
Because ``nargs='*'`` gathers any supplied values into a list, an absent
1056+
positional argument yields an empty list (``[]``). Only a non-``None``
1057+
*default* overrides this (so ``default=None`` still gives ``[]``).
10581058

10591059
For required_ arguments, the ``default`` value is ignored. For example, this
10601060
applies to positional arguments with nargs_ values other than ``?`` or ``*``,

0 commit comments

Comments
 (0)