[Tutor] finally

Christopher King g.nius.ck at gmail.com
Thu Jun 24 16:08:34 CEST 2010


so if you encounter an error that you won't handle, but you still to close
files and save data, you could use finally?

On Thu, Jun 24, 2010 at 10:05 AM, Christopher King <g.nius.ck at gmail.com>wrote:

> let me try it
>
> On Thu, Jun 24, 2010 at 9:38 AM, Hugo Arts <hugo.yoshi at gmail.com> wrote:
>
>> On Thu, Jun 24, 2010 at 3:13 PM, Christopher King <g.nius.ck at gmail.com>
>> wrote:
>> > i mean isn't handled
>> >
>>
>> When I said "guaranteed to run," I meant it. finally will *always* run
>> after your try clause, exceptions or not, handled or not.
>> And by manual, he means the python reference manual. He was quoting a
>> part covering the try statement:
>>
>> http://docs.python.org/reference/compound_stmts.html#the-try-statement
>>
>> Hugo
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100624/f4856854/attachment.html>


More information about the Tutor mailing list