This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients georg.brandl, ggenellina, pitrou, skip.montanaro
Date 2008-06-13.16:46:55
SpamBayes Score 0.009839
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
History
Date User Action Args
2008-06-13 16:46:58skip.montanarosetspambayes_score: 0.009839 -> 0.009839
recipients: + skip.montanaro, georg.brandl, ggenellina, pitrou
2008-06-13 16:46:57skip.montanarolinkissue3079 messages
2008-06-13 16:46:56skip.montanarocreate