update argparse's doc by daniel's comment

This commit is contained in:
Hai Shi 2020-05-22 23:20:39 +08:00
parent 82c28f3bce
commit b4f55a40ab
1 changed files with 4 additions and 4 deletions

View File

@ -786,10 +786,10 @@ how the command-line arguments should be handled. The supplied actions are:
Namespace(foo=True, bar=False, baz=True)
* ``'append'`` - This stores a list, and appends each argument value to the
list. If the default value is non-empty, the default elements
will be present in the parsed value for the option, with any values from the
command line appended after those default values. It is useful to allow
an option to be specified multiple times. Example usage::
list. It is useful to allow an option to be specified multiple times.
If the default value is non-empty, the default elements will be present
in the parsed value for the option, with any values from the
command line appended after those default values. Example usage::
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', action='append')