]> granicus.if.org Git - python/commitdiff
Add note about future import needed for with statement.
authorGeorg Brandl <georg@python.org>
Sat, 15 Dec 2007 09:34:59 +0000 (09:34 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 15 Dec 2007 09:34:59 +0000 (09:34 +0000)
Doc/tutorial/errors.rst

index ba0cbb36a2229f4f2bdd25baabc6c5de9de40110..34ab7a0399a2824c0188e0994591bca4113da52e 100644 (file)
@@ -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.