Add note about future import needed for with statement.

This commit is contained in:
Georg Brandl 2007-12-15 09:34:59 +00:00
parent 17b52afda6
commit 07b55eadc2
1 changed files with 4 additions and 0 deletions

View 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.