Kaydet (Commit) 0a94dfca authored tarafından Guido van Rossum's avatar Guido van Rossum

Erase all memory of the access statement

üst 25b361fc
...@@ -181,12 +181,12 @@ identifiers. They must be spelled exactly as written here: ...@@ -181,12 +181,12 @@ identifiers. They must be spelled exactly as written here:
\index{reserved word} \index{reserved word}
\begin{verbatim} \begin{verbatim}
access del from lambda return
and elif global not try and elif global not try
break else if or while break else if or while
class except import pass class except import pass
continue finally in print continue finally in print
def for is raise def for is raise
del from lambda return
\end{verbatim} \end{verbatim}
% When adding keywords, pipe it through keywords.py for reformatting % When adding keywords, pipe it through keywords.py for reformatting
......
...@@ -17,7 +17,6 @@ simple_stmt: expression_stmt ...@@ -17,7 +17,6 @@ simple_stmt: expression_stmt
| continue_stmt | continue_stmt
| import_stmt | import_stmt
| global_stmt | global_stmt
| access_stmt
| exec_stmt | exec_stmt
\end{verbatim} \end{verbatim}
...@@ -511,39 +510,3 @@ containing the \verb@exec@ statement. The same applies to the ...@@ -511,39 +510,3 @@ containing the \verb@exec@ statement. The same applies to the
\ttindex{eval} \ttindex{eval}
\ttindex{execfile} \ttindex{execfile}
\ttindex{compile} \ttindex{compile}
\section{The {\tt access} statement} \label{access}
\stindex{access}
\begin{verbatim}
access_stmt: "access" ...
\end{verbatim}
This statement is obsolete. It no longer generates any code; in the
future, \verb@access@ will no longer be a reserved word.
\section{The {\tt exec} statement} \label{exec}
\stindex{exec}
\begin{verbatim}
exec_stmt: "exec" expression ["in" expression ["," expression]]
\end{verbatim}
This statement supports dynamic execution of Python code. The first
expression should evaluate to either a string, an open file object, or
a code object. If it is a string, the string is parsed as a suite of
Python statements which is then executed (unless a syntax error
occurs). If it is an open file, the file is parsed until EOF and
executed. If it is a code object, it is simply executed.
In all cases, if the optional parts are omitted, the code is executed
in the current scope. If only the first expression after \verb@in@ is
specified, it should be a dictionary, which will be used for both the
global and the local variables. If two expressions are given, both
must be dictionaries and they are used for the global and local
variables, respectively.
Hints: dynamic evaluation of expressions is supported by the built-in
function \verb@eval()@. The built-in functions \verb@globals()@ and
\verb@locals()@ return the current global and local dictionary,
respectively, which may be useful to pass around for use by \verb@exec@.
...@@ -181,12 +181,12 @@ identifiers. They must be spelled exactly as written here: ...@@ -181,12 +181,12 @@ identifiers. They must be spelled exactly as written here:
\index{reserved word} \index{reserved word}
\begin{verbatim} \begin{verbatim}
access del from lambda return
and elif global not try and elif global not try
break else if or while break else if or while
class except import pass class except import pass
continue finally in print continue finally in print
def for is raise def for is raise
del from lambda return
\end{verbatim} \end{verbatim}
% When adding keywords, pipe it through keywords.py for reformatting % When adding keywords, pipe it through keywords.py for reformatting
......
...@@ -17,7 +17,6 @@ simple_stmt: expression_stmt ...@@ -17,7 +17,6 @@ simple_stmt: expression_stmt
| continue_stmt | continue_stmt
| import_stmt | import_stmt
| global_stmt | global_stmt
| access_stmt
| exec_stmt | exec_stmt
\end{verbatim} \end{verbatim}
...@@ -511,39 +510,3 @@ containing the \verb@exec@ statement. The same applies to the ...@@ -511,39 +510,3 @@ containing the \verb@exec@ statement. The same applies to the
\ttindex{eval} \ttindex{eval}
\ttindex{execfile} \ttindex{execfile}
\ttindex{compile} \ttindex{compile}
\section{The {\tt access} statement} \label{access}
\stindex{access}
\begin{verbatim}
access_stmt: "access" ...
\end{verbatim}
This statement is obsolete. It no longer generates any code; in the
future, \verb@access@ will no longer be a reserved word.
\section{The {\tt exec} statement} \label{exec}
\stindex{exec}
\begin{verbatim}
exec_stmt: "exec" expression ["in" expression ["," expression]]
\end{verbatim}
This statement supports dynamic execution of Python code. The first
expression should evaluate to either a string, an open file object, or
a code object. If it is a string, the string is parsed as a suite of
Python statements which is then executed (unless a syntax error
occurs). If it is an open file, the file is parsed until EOF and
executed. If it is a code object, it is simply executed.
In all cases, if the optional parts are omitted, the code is executed
in the current scope. If only the first expression after \verb@in@ is
specified, it should be a dictionary, which will be used for both the
global and the local variables. If two expressions are given, both
must be dictionaries and they are used for the global and local
variables, respectively.
Hints: dynamic evaluation of expressions is supported by the built-in
function \verb@eval()@. The built-in functions \verb@globals()@ and
\verb@locals()@ return the current global and local dictionary,
respectively, which may be useful to pass around for use by \verb@exec@.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment