Commit 5f7766c
committed
gh-110131: Restore the "for the option" scope in argparse's append docs
Before GH-131389 the bullet read "the default elements will be present in
the parsed value for the option". That copyedit rewrote the sentence and
added an example, and the qualifier went with it, which left the bullet
claiming something that does not hold for positionals: append with
nargs='*' or '?' and default=['X'] gives ['X', ['X']] on empty input,
because the default is applied twice.
gh-110131 is filed against both 'append' and 'extend', so put the scope
back rather than leave the two bullets disagreeing about it.1 parent 94bd220 commit 5f7766c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | | - | |
795 | | - | |
796 | | - | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
| |||
0 commit comments