- Add 'as' and 'with' as new keywords in 2.5.

- Regenerate keyword lists with reswords.py.
This commit is contained in:
George Yoshida 2006-05-20 16:29:14 +00:00
parent 6fffa5e865
commit 5c6a5ecddf
1 changed files with 13 additions and 9 deletions

View File

@ -308,23 +308,27 @@ identifiers. They must be spelled exactly as written here:%
\index{reserved word} \index{reserved word}
\begin{verbatim} \begin{verbatim}
and del for is raise and del from not while
assert elif from lambda return as elif global or with
break else global not try assert else if pass yield
class except if or while break except import print
continue exec import pass yield class exec in raise
def finally in print continue finally is return
def for lambda try
\end{verbatim} \end{verbatim}
% When adding keywords, use reswords.py for reformatting % When adding keywords, use reswords.py for reformatting
Note that although the identifier \code{as} can be used as part of the 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 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 \versionchanged[Both \keyword{as} and \keyword{with} are only recognized
\code{None} will both become keywords. 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}} \subsection{Reserved classes of identifiers\label{id-classes}}