[docs] [issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running
Ethan Furman
report at bugs.python.org
Wed Nov 19 06:08:20 CET 2014
Ethan Furman added the comment:
>From a post by Ian Kelly (https://mail.python.org/pipermail/python-list/2014-November/681073.html)
--------------------------------------------------------------
In fact it seems the behavior does differ between Python 2.7 and Python 3.4:
$ cat testatexit.py
import atexit
@atexit.register
def main():
atexit.register(goodbye)
@atexit.register
def goodbye():
print("Goodbye")
$ python2 testatexit.py
Goodbye
Goodbye
$ python3 testatexit.py
Goodbye
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22867>
_______________________________________
More information about the docs
mailing list