summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorge Yoshida <dynkin@gmail.com>2006-05-20 16:29:14 (GMT)
committerGeorge Yoshida <dynkin@gmail.com>2006-05-20 16:29:14 (GMT)
commit5c6a5ecddf8fa72ef07bbdf631ddca989d7fccec (patch)
tree0d8121a7d4aeead1ac52c586845a5115237b7ca0 /Doc
parent6fffa5e86599f621f72a10f919c02d8e44f26356 (diff)
downloadcpython-5c6a5ecddf8fa72ef07bbdf631ddca989d7fccec.zip
cpython-5c6a5ecddf8fa72ef07bbdf631ddca989d7fccec.tar.gz
cpython-5c6a5ecddf8fa72ef07bbdf631ddca989d7fccec.tar.bz2
- Add 'as' and 'with' as new keywords in 2.5.
- Regenerate keyword lists with reswords.py.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ref/ref2.tex22
1 files changed, 13 insertions, 9 deletions
diff --git a/Doc/ref/ref2.tex b/Doc/ref/ref2.tex
index 5971dab..b32eaa6 100644
--- a/Doc/ref/ref2.tex
+++ b/Doc/ref/ref2.tex
@@ -308,23 +308,27 @@ identifiers. They must be spelled exactly as written here:%
\index{reserved word}
\begin{verbatim}
-and del for is raise
-assert elif from lambda return
-break else global not try
-class except if or while
-continue exec import pass yield
-def finally in print
+and del from not while
+as elif global or with
+assert else if pass yield
+break except import print
+class exec in raise
+continue finally is return
+def for lambda try
\end{verbatim}
% When adding keywords, use reswords.py for reformatting
Note that although the identifier \code{as} can be used as part of the
syntax of \keyword{import} statements, it is not currently a reserved
-word.
+word by default.}
-In some future version of Python, the identifiers \code{as} and
-\code{None} will both become keywords.
+\versionchanged[Both \keyword{as} and \keyword{with} are only recognized
+when the \code{with_statement} feature has been enabled. It will always
+be enabled in Python 2.6. See section~\ref{with} for details]{2.5}
+In some future version of Python, the identifier \code{None} will
+become a keyword.
\subsection{Reserved classes of identifiers\label{id-classes}}