File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -729,15 +729,17 @@ how the command-line arguments should be handled. The supplied actions are:
729729 >>> parser.parse_args('--foo'.split())
730730 Namespace(foo=42)
731731
732- * ``'store_true' `` and ``'store_false' `` - These store the values ``True `` and
733- ``False `` respectively. These are special cases of ``'store_const' ``. For
734- example::
732+ * ``'store_true' `` and ``'store_false' `` - These are special cases of
733+ ``'store_const' `` used for storing the values ``True `` and ``False ``
734+ respectively. In addition, they create default values of ``False `` and
735+ ``True `` respectively. For example::
735736
736737 >>> parser = argparse.ArgumentParser()
737738 >>> parser.add_argument('--foo', action='store_true')
738739 >>> parser.add_argument('--bar', action='store_false')
740+ >>> parser.add_argument('--baz', action='store_false')
739741 >>> parser.parse_args('--foo --bar'.split())
740- Namespace(bar=False, foo =True)
742+ Namespace(foo=True, bar=False, baz =True)
741743
742744* ``'append' `` - This stores a list, and appends each argument value to the
743745 list. This is useful to allow an option to be specified multiple times.
You can’t perform that action at this time.
0 commit comments