[Python-checkins] r43361 - python/trunk/Doc/ref/ref7.tex

phillip.eby python-checkins at python.org
Mon Mar 27 23:42:30 CEST 2006


Author: phillip.eby
Date: Mon Mar 27 23:42:30 2006
New Revision: 43361
Modified:
 python/trunk/Doc/ref/ref7.tex
Log:
The "with" statement needs a __future__. :)
Modified: python/trunk/Doc/ref/ref7.tex
==============================================================================
--- python/trunk/Doc/ref/ref7.tex	(original)
+++ python/trunk/Doc/ref/ref7.tex	Mon Mar 27 23:42:30 2006
@@ -363,6 +363,17 @@
 
 \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


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /