Rogi <[email protected]> added the comment:
@mhammond
You said:
"The docs are wrong regardless - I don't think anyone would
suggest the behaviour match the docs regarding SystemError -
having Py_Main return on SystemError would be backwards
incompatible."
but teh problem is:
Py_Main() calls exit() on SystemExit instead of returning.
and documentation says:
"The return value will be the integer passed to the sys.exit()
function, 1 if the interpreter exits due to an exception, or 2
if the parameter list does not represent a valid Python command
line."
which seems to be teh desired and broken behaviour.
Similar problems happen with other functions, such as
PyRun_SimpleString(), and teh solution to all those issues are related.
What teh docs says currently about SystemError calling exit() is just
_WRONG_.
Also, I am not asking for a new feature. I'm pointing that there is
something wrong, with teh docs or teh code, and that it is probably teh
code.
I hope this clarified teh situation.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue6498>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com