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.

Recipients, georg.brandl, ggenellina, pitrou, r.david.murray, skip.montanaro
Date 2009-10-16.03:33:12
SpamBayes Score 0.00019394468
Marked as misclassified No
Message-id <>
In-reply-to <>
Thanks for the response!

I can indeed catch SystemExit, but I would like to be able to take one 
action (terminate the program) if the user supplied an unknown option, 
and another action (prompt for a new value) if the user supplied a bad 
value for an option.  I suspect that I can achieve this by subclassing, 
but I'm not yet at that level of Python sophistication.



R. David Murray wrote:
> R. David Murray <> added the comment:
> There was recently a long discussion of this on python-dev (in the
> context of a proposal to add argparse to the stdlib; argparse does the
> same thing).  The conclusion was that the current behavior is the most
> useful behavior, and that if you don't want to exit you can either
> subclass or catch SystemExit.
> ----------
> nosy: +r.david.murray
> resolution:  -> wont fix
> stage:  -> committed/rejected
> status: open -> closed
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
Date User Action Args
2009-10-16 03:33:14Phillip.M.Feldman@gmail.comsetrecipients: +, skip.montanaro, georg.brandl, ggenellina, pitrou, r.david.murray
2009-10-16 03:33:12Phillip.M.Feldman@gmail.comlinkissue3079 messages
2009-10-16 03:33:12Phillip.M.Feldman@gmail.comcreate