Message68171
| Author |
skip.montanaro |
| Recipients |
georg.brandl, ggenellina, pitrou, skip.montanaro |
| Date |
2008年06月13日.16:46:55 |
| SpamBayes Score |
0.009839004 |
| Marked as misclassified |
No |
| Message-id |
<18514.42107.819452.960212@montanaro-dyndns-org.local> |
| In-reply-to |
<1213363672.51.0.133113191548.issue3079@psf.upfronthosting.co.za> |
| Content |
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 |
|