Elliot Edmunds <edmundsell...@gmail.com> added the comment:

I have personally come across situations where I am calling a Python script 
from a C program and would like to check the exit codes of the script, and have 
had to write sys.exit(1) and sys.exit(0) in Python, and compared them to 
EXIT_SUCCESS/EXIT_FAILURE in C. It would have been easy to introduce a bug 
where I returned the wrong exit code, so I was hoping they would have been 
implemented in sys.

It seems like a no-brainer to add these, they reduce magic number use and 
improve the accessibility of Python to people coming from C. I would love to 
add these if everyone is OK with it.

----------
nosy: +Elliot Edmunds
versions: +Python 3.8 -Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://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