Message231354
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 |
|
Date |
User |
Action |
Args |
2014-11-19 05:08:20 | ethan.furman | set | recipients:
+ ethan.furman, skip.montanaro, docs@python, martin.panter |
2014-11-19 05:08:20 | ethan.furman | set | messageid: <1416373700.52.0.791964052479.issue22867@psf.upfronthosting.co.za> |
2014-11-19 05:08:20 | ethan.furman | link | issue22867 messages |
2014-11-19 05:08:19 | ethan.furman | create | |
|