Skip to content

Commit a52fd96

Browse files
Update Doc/library/argparse.rst
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parent 3c649a7 commit a52fd96

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Doc/library/argparse.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,9 +2124,8 @@ Parser defaults
21242124
Namespace(bar=42, baz='badger', foo=736)
21252125

21262126
Note that defaults can be set at both the parser level using :meth:`set_defaults`
2127-
and at the argument level using :meth:`add_argument`. If both are provided for the
2128-
same argument, the order of setting these defaults determines which one takes
2129-
precedence. The last default set for an argument is the one that is used::
2127+
and at the argument level using :meth:`add_argument`. If both are called for the
2128+
same argument, the last default set for an argument is used::
21302129

21312130
>>> parser = argparse.ArgumentParser()
21322131
>>> parser.add_argument('--foo', default='bar')

0 commit comments

Comments
 (0)