]> granicus.if.org Git - python/commitdiff
#14391: clarify docstring discussion of Action's 'type' argument's value.
authorR David Murray <rdmurray@bitdance.com>
Sat, 21 Jul 2012 21:04:25 +0000 (17:04 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 21 Jul 2012 21:04:25 +0000 (17:04 -0400)
Lib/argparse.py

index 2202b5732024982d4eb91e2d144593bae60e9349..cf0097bf48e261fb50a7952c579af2ffaac92fe9 100644 (file)
@@ -736,10 +736,10 @@ class Action(_AttributeHolder):
 
         - 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