Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 15cd9a0

Browse files
committed
#14391: clarify docstring discussion of Action's 'type' argument's value.
1 parent e3de175 commit 15cd9a0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/argparse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,10 @@ class Action(_AttributeHolder):
736736
737737
- default -- The value to be produced if the option is not specified.
738738
739-
- type -- The type which the command-line arguments should be converted
740-
to, should be one of 'string', 'int', 'float', 'complex' or a
741-
callable object that accepts a single string argument. If None,
742-
'string' is assumed.
739+
- type -- A callable that accepts a single string argument, and
740+
returns the converted value. The standard Python types str, int,
741+
float, and complex are useful examples of such callables. If None,
742+
str is used.
743743
744744
- choices -- A container of values that should be allowed. If not None,
745745
after a command-line argument has been converted to the appropriate

0 commit comments

Comments
 (0)