Author jgehrcke
Recipients Arfrever, David.Manowitz, docs@python, ggenellina, jgehrcke, martin.panter, pitrou, stutzbach, terry.reedy
Date 2015-02-02.22:33:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422916422.22.0.0801048434624.issue6634@psf.upfronthosting.co.za>
In-reply-to
Content
> Regarding the documentation patch: I like to start sentences
> with a capital letter. Perhaps change it to start
> “Calling :func:`exit` only terminates . . .”.

Thanks for feedback. Have now used "Invocation of ...." to not repeat "call*" in the sentence, because I left the "when called from the main thread" part unchanged. Okay?

> With the code change patch, it might be neater to use
> the SystemExit.code attribute rather than e.args[0].

Oh, thanks. Was not aware of the existence of the `code` attribute. If anyone else was wondering: existence and behavior are defined in Objects/exceptions.c via `static PyMemberDef SystemExit_members[]` and via `static int SystemExit_init()`.

It is populated upon construction of a SystemExit instance:

Py_CLEAR(self->code);
if (size == 1)
    self->code = PyTuple_GET_ITEM(args, 0);
else /* size > 1 */
    self->code = args;
    
Hence, the translation from arguments to exit code considers *all* arguments. I adjusted the patch to use the `code` attribute.
History
Date User Action Args
2015-02-02 22:33:42jgehrckesetrecipients: + jgehrcke, terry.reedy, ggenellina, pitrou, stutzbach, Arfrever, docs@python, martin.panter, David.Manowitz
2015-02-02 22:33:42jgehrckesetmessageid: <1422916422.22.0.0801048434624.issue6634@psf.upfronthosting.co.za>
2015-02-02 22:33:42jgehrckelinkissue6634 messages
2015-02-02 22:33:42jgehrckecreate