mirror of https://github.com/python/cpython
Add note about future import needed for with statement.
This commit is contained in:
parent
17b52afda6
commit
07b55eadc2
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue