summaryrefslogtreecommitdiffstats
path: root/Doc/ref/ref7.tex
diff options
context:
space:
mode:
authorPhillip J. Eby <pje@telecommunity.com>2006-03-27 21:42:30 (GMT)
committerPhillip J. Eby <pje@telecommunity.com>2006-03-27 21:42:30 (GMT)
commit16e86da730c4e22fa4e9ea950574055057a6461b (patch)
treeedb018907ce7cfb122b4f03014bb6ec7f1632487 /Doc/ref/ref7.tex
parent075ef1ac1b2a4722cf20806e6df3f01acd6adfd5 (diff)
downloadcpython-16e86da730c4e22fa4e9ea950574055057a6461b.zip
cpython-16e86da730c4e22fa4e9ea950574055057a6461b.tar.gz
cpython-16e86da730c4e22fa4e9ea950574055057a6461b.tar.bz2
The "with" statement needs a __future__. :)
Diffstat (limited to 'Doc/ref/ref7.tex')
-rw-r--r--Doc/ref/ref7.tex11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/ref/ref7.tex b/Doc/ref/ref7.tex
index 5188fa1..a5a6eaf 100644
--- a/Doc/ref/ref7.tex
+++ b/Doc/ref/ref7.tex
@@ -363,6 +363,17 @@ at the normal location for the kind of exit that was taken.
\end{enumerate}
+\begin{notice}
+In Python 2.5, the \keyword{with} statement is only allowed
+when the \code{with_statement} feature has been enabled. It will always
+be enabled in Python 2.6. This \code{__future__} import statement can
+be used to enable the feature:
+
+\begin{verbatim}
+from __future__ import with_statement
+\end{verbatim}
+\end{notice}
+
\begin{seealso}
\seepep{0343}{The "with" statement}
{The specification, background, and examples for the