Message231354
| Author |
ethan.furman |
| Recipients |
docs@python, ethan.furman, martin.panter, skip.montanaro |
| Date |
2014年11月19日.05:08:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1416373700.52.0.791964052479.issue22867@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|