summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-12-15 09:34:59 (GMT)
committerGeorg Brandl <georg@python.org>2007-12-15 09:34:59 (GMT)
commit07b55eadc2bff36641643528fb5e566a2f0fd1e0 (patch)
tree3c22518f40f2676e3795cf2c7879026fa28878b2 /Doc/tutorial
parent17b52afda643e49d74ce4b1f0c9967c87015bf93 (diff)
downloadcpython-07b55eadc2bff36641643528fb5e566a2f0fd1e0.zip
cpython-07b55eadc2bff36641643528fb5e566a2f0fd1e0.tar.gz
cpython-07b55eadc2bff36641643528fb5e566a2f0fd1e0.tar.bz2
Add note about future import needed for with statement.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/errors.rst4
1 files changed, 4 insertions, 0 deletions
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.