Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Georg> I agree with Antoine that the standard behavior is what you want in most
    Georg> simple command-line scripts.

    Georg> It's easy enough to replace the parser's exit function to just print 
the
    Georg> message, or raise an exception.

Check the code.  Most of the time error is called without an exception
having been raised.  In one case it actually is called and swallows an
exception that the code did raise.  It would be preferable in my mind to
always raise an exception.  If you want, the default can be to catch them
and ignore them as error() does now, but as it stands you can't raise
anything more specific than OptParseError, and that's just a punt even
though specific problems were detected by the code.

Skip

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3079>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to