Message132461
| Author |
Rogi |
| Recipients |
Rakeka, Rogi, eric.frederich, georg.brandl, mhammond, santoso.wijaya, vstinner |
| Date |
2011年03月29日.04:15:33 |
| SpamBayes Score |
1.8429702e-14 |
| Marked as misclassified |
No |
| Message-id |
<1301372133.88.0.164649201329.issue6498@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
@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. |
|