]> granicus.if.org Git - python/commitdiff
Issue #25314: Remove confused statement about const argument
authorMartin Panter <vadmium+py@gmail.com>
Sat, 9 Apr 2016 03:49:48 +0000 (03:49 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 9 Apr 2016 03:49:48 +0000 (03:49 +0000)
Doc/library/argparse.rst

index 785ecbf44b598dc1a80886313152f236eaaa40f4..6181ee2c7a69b6619be3f0984f01473514a0a4c8 100644 (file)
@@ -720,8 +720,7 @@ how the command-line arguments should be handled. The supplied actions are:
     Namespace(foo='1')
 
 * ``'store_const'`` - This stores the value specified by the const_ keyword
-  argument.  (Note that the const_ keyword argument defaults to the rather
-  unhelpful ``None``.)  The ``'store_const'`` action is most commonly used with
+  argument.  The ``'store_const'`` action is most commonly used with
   optional arguments that specify some sort of flag.  For example::
 
     >>> parser = argparse.ArgumentParser()
@@ -923,7 +922,8 @@ the various :class:`ArgumentParser` actions.  The two most common uses of it are
   command-line argument following it, the value of ``const`` will be assumed instead.
   See the nargs_ description for examples.
 
-The ``const`` keyword argument defaults to ``None``.
+With the ``'store_const'`` and ``'append_const'`` actions, the ``const``
+keyword argument must be given.  For other actions, is defaults to ``None``.
 
 
 default