This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author giampaolo.rodola
Recipients giampaolo.rodola
Date 2010-09-07.10:27:11
SpamBayes Score 0.0062886025
Marked as misclassified No
Message-id <1283855234.53.0.604946356676.issue9788@psf.upfronthosting.co.za>
In-reply-to
Content
import atexit

@atexit.register
def goodbye1():
    print(1)
    
@atexit.register
def goodbye2():
    print(2)

The code above prints:

2
1

...that is, the last registered function is executed first.
Wouldn't the contrary be better?
History
Date User Action Args
2010-09-07 10:27:14giampaolo.rodolasetrecipients: + giampaolo.rodola
2010-09-07 10:27:14giampaolo.rodolasetmessageid: <1283855234.53.0.604946356676.issue9788@psf.upfronthosting.co.za>
2010-09-07 10:27:12giampaolo.rodolalinkissue9788 messages
2010-09-07 10:27:11giampaolo.rodolacreate