Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #20447
| Date | 2012-02-15 15:41 +0000 |
|---|---|
| From | Andrea Crotti <andrea.crotti.0@gmail.com> |
| Subject | Re: atexit.register in case of errors |
| References | <mailman.5827.1329311531.27778.python-list@python.org> <jhgc7t$b2m$1@speranza.aioe.org> <mailman.5829.1329313984.27778.python-list@python.org> <jhgicb$v3k$1@r03.glglgl.gl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5833.1329320476.27778.python-list@python.org> (permalink) |
On 02/15/2012 03:18 PM, Thomas Rachel wrote: > > Wouldn't > > if __name__ == '__main__': > try: > main() > finally: > goodbye() > > be even better? Or doesn't it work well together with SystemExit? > > > Thomas Well in that case goodbye is always called, even if I have some other nasty exception, which is not what I want.. (and is exactly what I had with atexit.register). Isn't it?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 13:12 +0000
Re: atexit.register in case of errors Mel Wilson <mwilson@the-wire.com> - 2012-02-15 08:33 -0500
Re: atexit.register in case of errors Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-02-15 08:52 -0500
Re: atexit.register in case of errors Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-02-15 16:18 +0100
Re: atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 15:41 +0000
Re: atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 14:35 +0000
Re: atexit.register in case of errors Miki Tebeka <miki.tebeka@gmail.com> - 2012-02-15 10:40 -0800
Re: atexit.register in case of errors Miki Tebeka <miki.tebeka@gmail.com> - 2012-02-15 10:40 -0800
csiph-web