From 07b55eadc2bff36641643528fb5e566a2f0fd1e0 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 15 Dec 2007 09:34:59 +0000 Subject: Add note about future import needed for with statement. --- Doc/tutorial/errors.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index ba0cbb3..34ab7a0 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. -- cgit v0.12