Message235296
> 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. |
|
Date |
User |
Action |
Args |
2015-02-02 22:33:42 | jgehrcke | set | recipients:
+ jgehrcke, terry.reedy, ggenellina, pitrou, stutzbach, Arfrever, docs@python, martin.panter, David.Manowitz |
2015-02-02 22:33:42 | jgehrcke | set | messageid: <1422916422.22.0.0801048434624.issue6634@psf.upfronthosting.co.za> |
2015-02-02 22:33:42 | jgehrcke | link | issue6634 messages |
2015-02-02 22:33:42 | jgehrcke | create | |
|