[Python-checkins] cpython (merge 3.5 -> default): Issue #25314: Merge argparse doc from 3.5

martin.panter python-checkins at python.org
Fri Apr 15 20:22:08 EDT 2016


https://hg.python.org/cpython/rev/7d61a991f405
changeset:   101003:7d61a991f405
parent:      101000:3103af76f4c4
parent:      101002:59b8db278e3c
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Apr 16 00:20:21 2016 +0000
summary:
  Issue #25314: Merge argparse doc from 3.5

files:
  Doc/library/argparse.rst |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -720,8 +720,7 @@
     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 @@
   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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list