This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2011-03-29 04:15:33Rogisetrecipients: + Rogi, mhammond, georg.brandl, vstinner, Rakeka, santoso.wijaya, eric.frederich
2011-03-29 04:15:33Rogisetmessageid: <1301372133.88.0.164649201329.issue6498@psf.upfronthosting.co.za>
2011-03-29 04:15:33Rogilinkissue6498 messages
2011-03-29 04:15:33Rogicreate