Xuanji Li <xua...@gmail.com> added the comment:

I don't think it's best to create a new subclass to throw an ArgumentParserExit 
exception; if I read the stack trace I'd see that an ArgumentError was thrown, 
then caught, then an ArgumentParserExit was thrown, which IMHO is confusing. In 
the current design, parse_known_errors catches an ArgumentError and then exits. 
I propose that the user be optionally allowed to turn off the handling of 
ArgumentError and to handle it himself instead through an 
exit_on_argument_error flag. 

Attached patch does this. Also I think this issue falls under component 'Lib' 
too.

----------
components: +Library (Lib)
keywords: +patch
Added file: http://bugs.python.org/file21793/issue9938.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9938>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to