summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-07-21 21:06:28 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-07-21 21:06:28 (GMT)
commit1a2c1fbfd2208407e1af365b161276b6f103c1ad (patch)
tree919d43cae5f5872c6e29e35e7800483c22d3c664 /Lib/argparse.py
parentac9b5c67d35ee100ff1d80f4d55c307aab4ca4e7 (diff)
downloadcpython-1a2c1fbfd2208407e1af365b161276b6f103c1ad.zip
cpython-1a2c1fbfd2208407e1af365b161276b6f103c1ad.tar.gz
cpython-1a2c1fbfd2208407e1af365b161276b6f103c1ad.tar.bz2
#14391: clarify docstring discussion of Action's 'type' argument's value.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r--Lib/argparse.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index a9129de..d867611 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -740,10 +740,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