[Tutor] finally without try or except

Tino Dai oberoc at gmail.com
Mon Jul 30 18:56:08 CEST 2012


Hi!

     Is there anyway to execute a block of code at the end of a program in
2.6 regardless of what happened before eg exiting normally or died because
of an exception?
I was thinking about maybe a free standing finally code block or a
decorator.

Any hints?
Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120730/c5d679b9/attachment.html>


More information about the Tutor mailing list