From: Georg Brandl Date: Sat, 15 Dec 2007 09:34:59 +0000 (+0000) Subject: Add note about future import needed for with statement. X-Git-Tag: v2.6a1~857 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07b55eadc2bff36641643528fb5e566a2f0fd1e0;p=python Add note about future import needed for with statement. --- diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index ba0cbb36a2..34ab7a0399 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -408,4 +408,8 @@ After the statement is executed, the file *f* is always closed, even if a problem was encountered while processing the lines. Other objects which provide predefined clean-up actions will indicate this in their documentation. +.. note:: + Since :keyword:`with` is a new language keyword, it must be enabled by + executing ``from __future__ import with_statement`` in Python 2.5. + From 2.6 on, it will always be enabled.