File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -720,8 +720,7 @@ how the command-line arguments should be handled. The supplied actions are:
720720 Namespace(foo='1')
721721
722722* ``'store_const' `` - This stores the value specified by the const _ keyword
723- argument. (Note that the const _ keyword argument defaults to the rather
724- unhelpful ``None ``.) The ``'store_const' `` action is most commonly used with
723+ argument. The ``'store_const' `` action is most commonly used with
725724 optional arguments that specify some sort of flag. For example::
726725
727726 >>> parser = argparse.ArgumentParser()
@@ -923,7 +922,8 @@ the various :class:`ArgumentParser` actions. The two most common uses of it are
923922 command-line argument following it, the value of ``const `` will be assumed instead.
924923 See the nargs _ description for examples.
925924
926- The ``const `` keyword argument defaults to ``None ``.
925+ With the ``'store_const' `` and ``'append_const' `` actions, the ``const ``
926+ keyword argument must be given. For other actions, is defaults to ``None ``.
927927
928928
929929default
You can’t perform that action at this time.
0 commit comments