[issue6498] Py_Main() does not return on SystemExit

Rogi report at bugs.python.org
Tue Mar 29 02:32:38 CEST 2011


Rogi <rogi at linuxmail.org> added the comment:

@mhammond

	After reading your post again I noticed you talk about
SystemError and not SystemExit. In fact, Py_Main() should not return on
SystemError. Teh documentation states "if the interpreter exits due to
an exception", which implies teh interpreter _exiting_, not simply
catching a exception.

	It is just a BAD IDEA to allow python functions to print
messages or call exit() as they wish. They should be split so teh
programmer could put printing and exiting where he finds appropriate.
Teh printing part is just another nuisance, but teh exit() is serious.

	Again, all of this could be accomplished while maintaining
backward compatibility.

Cheers.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6498>
_______________________________________


More information about the Python-bugs-list mailing list