Toshihiro Kamishima added the comment:
> - 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
Toshihiro Kamishima added the comment:
Thank you for your response.
My patch makes raise error by minimal change, but it may be better to raise
NameError as in a case specifying "type=string" in 2.7.2.
Similar to the case "type=bool", specifications, such as "typ
New submission from Toshihiro Kamishima :
According to the documentation of "argparse.Action", a keyword 'bool' is not
allowed for type argument, but it doesn't raise no errors.
One possible way to fix this issue is to check in the
"argparse._Actions
New submission from Toshihiro Kamishima :
Keywords to specify as string type are incorrect.
'string' should be 'str'
--
components: Library (Lib)
files: argparse.py.patch
keywords: patch
messages: 156635
nosy: shima__shima
priority: normal
severity: normal
status: o