summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-07-21 21:05:24 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-07-21 21:05:24 (GMT)
commitaf418b2232e81499a81b7aa1d4879a9b594fc6a9 (patch)
treeaddfbb0087280b7eb7fd4bda0d3cc55bd2854cf4 /Lib
parent779b63d005c4e818f907e0e32bdc34ebd860cc61 (diff)
parent15cd9a0be4cfa7875267a06046a8c20ab8bb3482 (diff)
downloadcpython-af418b2232e81499a81b7aa1d4879a9b594fc6a9.zip
cpython-af418b2232e81499a81b7aa1d4879a9b594fc6a9.tar.gz
cpython-af418b2232e81499a81b7aa1d4879a9b594fc6a9.tar.bz2
Merge #14391: clarify docstring discussion of Action's 'type' argument's value.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/argparse.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index ab3ec4b..7fa3712 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -761,10 +761,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