Commit 07327c2
authored
fix incorrect statement in argparse docs
The documentation for the name or flags argument of `argparse.ArgumentParser.add_argument()` said
> By default, argparse automatically handles the internal naming and display names of arguments … The dest parametre defaults to the argument name with underscores `_` replacing hyphens `-` .
However, this is not true for positional arguments, which retain their hyphens. The documentation for the dest parameter correctly describes this behavior, but a user who only reads the name or flags documentation will be misled.
Thus, I added a qualification to the sentence to make clear that the hyphen relpacement only happens for optional argiments.1 parent bd13cc0 commit 07327c2
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | | - | |
743 | | - | |
744 | | - | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| |||
0 commit comments