[issue14392] type=bool doesn't raise error in argparse.Action

2017-01-09 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

[issue14392] type=bool doesn't raise error in argparse.Action

2012-07-21 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I can't find anywhere in the documentation where type=bool, type=unicode or type=long are disallowed. They shouldn't be disallowed. If you want to pass type=bool, argparse should not stop you. And it currently doesn't: parser =

[issue14392] type=bool doesn't raise error in argparse.Action

2012-07-21 Thread Toshihiro Kamishima
Toshihiro Kamishima m...@kamishima.net 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 argument. If None, 'string'

[issue14392] type=bool doesn't raise error in argparse.Action

2012-03-25 Thread Toshihiro Kamishima
Toshihiro Kamishima m...@kamishima.net 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 type=unicode or

[issue14392] type=bool doesn't raise error in argparse.Action

2012-03-24 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: This change maked the error message wrong if bool is rejected. -- nosy: +bethard, terry.reedy stage: - test needed type: - behavior ___ Python tracker rep...@bugs.python.org

[issue14392] type=bool doesn't raise error in argparse.Action

2012-03-24 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The corresponding current code in 3.2 and 3.3 is the same. -- versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14392

[issue14392] type=bool doesn't raise error in argparse.Action

2012-03-23 Thread Toshihiro Kamishima
New submission from Toshihiro Kamishima m...@kamishima.net: 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._ActionsContainer.add_argument