[Python-checkins] cpython (merge 3.2 -> default): Merge #14391: clarify docstring discussion of Action's 'type' argument's value.

r.david.murray python-checkins at python.org
Sat Jul 21 23:07:06 CEST 2012


http://hg.python.org/cpython/rev/3d1ea33611c1
changeset:   78227:3d1ea33611c1
parent:      78224:30d4d1528b58
parent:      78226:e7f205ce080e
user:        R David Murray <rdmurray at bitdance.com>
date:        Sat Jul 21 17:05:24 2012 -0400
summary:
  Merge #14391: clarify docstring discussion of Action's 'type' argument's value.

files:
  Lib/argparse.py |  8 ++++----
  1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Lib/argparse.py b/Lib/argparse.py
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -761,10 +761,10 @@
 
         - default -- The value to be produced if the option is not specified.
 
-        - type -- The type which the command-line arguments should be converted
-            to, should be one of 'string', 'int', 'float', 'complex' or a
-            callable object that accepts a single string argument. If None,
-            'string' is assumed.
+        - type -- A callable that accepts a single string argument, and
+            returns the converted value.  The standard Python types str, int,
+            float, and complex are useful examples of such callables.  If None,
+            str is used.
 
         - choices -- A container of values that should be allowed. If not None,
             after a command-line argument has been converted to the appropriate

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


More information about the Python-checkins mailing list