[Tutor] Examples of "With....As Statement" in Python

James Bell bell.james03 at gmail.com
Tue Jul 10 16:58:01 CEST 2012


I'm attempting to learn how to use the "with....as" statement in python.

I've read the documentation and also a few tutorials but I still cannot
understand the concept. or how this is normally used. Can someone please
write an example or 2 of simple ways to use the "with statement".

I understand in java the try...catch...finally block so maybe someone can
point out the relationship between them.

thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120710/9975cf09/attachment.html>


More information about the Tutor mailing list