Alexander Belopolsky added the comment:

> 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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24053>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to