[Tutor] finally

Chris g.nius.ck at gmail.com
Thu Jun 24 16:34:19 CEST 2010


On 06/24/2010 10:29 AM, Walter Prins wrote:
> On 24 June 2010 15:08, Christopher King <g.nius.ck 
> <http://g.nius.ck>@gmail.com <http://gmail.com>> wrote:
>
>     so if you encounter an error that you won't handle, but you still
>     to close files and save data, you could use finally?
>
>
> More strongly, you *should* use finally, as there's no other way to 
> ensure your cleanup code will run regardless of unpredictable 
> exceptions that may be thrown...
>
> Walter
cleanup code means code to close files and save data, right
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100624/89243775/attachment.html>


More information about the Tutor mailing list