Skip to content

Commit 7eb347b

Browse files
Add clarification on name collision
1 parent 6544bf4 commit 7eb347b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Doc/library/argparse.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,10 @@ behavior::
13691369
>>> parser.parse_args('--foo XXX'.split())
13701370
Namespace(bar='XXX')
13711371

1372+
Multiple arguments may share the same ``dest``. By default the value from the
1373+
last such argument given on the command line wins; use ``action='append'`` to
1374+
collect values from all of them into a list instead.
1375+
13721376
.. versionchanged:: 3.15
13731377
Single-dash long option now takes precedence over short options.
13741378

0 commit comments

Comments
 (0)