Skip to content

Commit 2e7ff21

Browse files
adjust phrasing in argparse docs
Co-authored-by: Savannah Ostrowski <savannah@python.org>
1 parent 07327c2 commit 2e7ff21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/argparse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,8 @@ By default, :mod:`!argparse` automatically handles the internal naming and
739739
display names of arguments, simplifying the process without requiring
740740
additional configuration.
741741
As such, you do not need to specify the dest_ and metavar_ parameters.
742-
The dest_ parameter defaults to the argument name, with underscores ``_``
743-
replacing hyphens ``-`` if the argument is optional . The metavar_
742+
For optional arguments, the dest_ parameter defaults to the argument name, with underscores ``_``
743+
replacing hyphens ``-``. The metavar_
744744
parameter defaults to the upper-cased name. For example::
745745

746746
>>> parser = argparse.ArgumentParser(prog='PROG')

0 commit comments

Comments
 (0)