[issue27035] Cannot set exit code in atexit callback

Glyph Lefkowitz report at bugs.python.org
Sun May 3 04:25:19 EDT 2020


Glyph Lefkowitz <glyph at twistedmatrix.com> added the comment:

This bug has been filed several times:

issue1257
issue11654

and it's tempting to simply close this as a dup, but this ticket mentions the documentation, which is slightly confusing: 

https://docs.python.org/3.8/library/atexit.html#atexit.register

It's not *wrong* exactly; 3.8's behavior matches the letter of the documentation, but "the last exception to be raised is re-raised" *implies* a change in exit code, since that is what would normally happen if an exception were re-raised at the top level.

So would it be a good idea to change the documentation?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27035>
_______________________________________


More information about the Python-bugs-list mailing list