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 belopolsky
Recipients belopolsky, ethan.furman, mark.dickinson, pitrou, serhiy.storchaka, skrah, terry.reedy
Date 2015-04-27.18:46:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430160408.35.0.0396066017723.issue24053@psf.upfronthosting.co.za>
In-reply-to
Content
> This can be implemented as separate module on PyPI.

Sure!  Make them even less discoverable!

Let me try to state my motivations for adding these constants:

1. I find exit(EXIT_FAILURE) much clearer than exit(1). 
2. I want people to standardize on status=1 for a generic failure code.  I do see exit(-1) used as often as exit(1).
3. I want discourage people from using computed integer results as exit status.  For example,

# process files and store errors in a list
sys.exit(len(errors))  # bad - success for multiples of 256 errors
sys.exit(sys.EXIT_SUCCESS if not errors else sys.EXIT_FAILURE)  # good
History
Date User Action Args
2015-04-27 18:46:48belopolskysetrecipients: + belopolsky, terry.reedy, mark.dickinson, pitrou, skrah, ethan.furman, serhiy.storchaka
2015-04-27 18:46:48belopolskysetmessageid: <1430160408.35.0.0396066017723.issue24053@psf.upfronthosting.co.za>
2015-04-27 18:46:48belopolskylinkissue24053 messages
2015-04-27 18:46:48belopolskycreate