Mercurial > cpython-lru_cache-weakref
diff Lib/argparse.py @ 78226:e7f205ce080e 3.2
#14391: clarify docstring discussion of Action's 'type' argument's value.
| author | R David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Sat, 21 Jul 2012 17:04:25 -0400 |
| parents | 8e57b5d8f58f |
| children | ac53876d1cc8 3d1ea33611c1 |
line wrap: on
line diff
--- a/Lib/argparse.py Sat Jul 21 14:33:56 2012 -0400 +++ b/Lib/argparse.py Sat Jul 21 17:04:25 2012 -0400 @@ -736,10 +736,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
