mirror of
https://github.com/python/cpython.git
synced 2024-11-28 08:20:55 +01:00
Erase all memory of the access statement
This commit is contained in:
parent
25b361fc14
commit
0a94dfcab8
@ -181,12 +181,12 @@ identifiers. They must be spelled exactly as written here:
|
||||
\index{reserved word}
|
||||
|
||||
\begin{verbatim}
|
||||
access del from lambda return
|
||||
and elif global not try
|
||||
break else if or while
|
||||
class except import pass
|
||||
continue finally in print
|
||||
def for is raise
|
||||
del from lambda return
|
||||
\end{verbatim}
|
||||
|
||||
% When adding keywords, pipe it through keywords.py for reformatting
|
||||
|
@ -17,7 +17,6 @@ simple_stmt: expression_stmt
|
||||
| continue_stmt
|
||||
| import_stmt
|
||||
| global_stmt
|
||||
| access_stmt
|
||||
| exec_stmt
|
||||
\end{verbatim}
|
||||
|
||||
@ -511,39 +510,3 @@ containing the \verb@exec@ statement. The same applies to the
|
||||
\ttindex{eval}
|
||||
\ttindex{execfile}
|
||||
\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:
|
||||
\index{reserved word}
|
||||
|
||||
\begin{verbatim}
|
||||
access del from lambda return
|
||||
and elif global not try
|
||||
break else if or while
|
||||
class except import pass
|
||||
continue finally in print
|
||||
def for is raise
|
||||
del from lambda return
|
||||
\end{verbatim}
|
||||
|
||||
% When adding keywords, pipe it through keywords.py for reformatting
|
||||
|
37
Doc/ref6.tex
37
Doc/ref6.tex
@ -17,7 +17,6 @@ simple_stmt: expression_stmt
|
||||
| continue_stmt
|
||||
| import_stmt
|
||||
| global_stmt
|
||||
| access_stmt
|
||||
| exec_stmt
|
||||
\end{verbatim}
|
||||
|
||||
@ -511,39 +510,3 @@ containing the \verb@exec@ statement. The same applies to the
|
||||
\ttindex{eval}
|
||||
\ttindex{execfile}
|
||||
\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@.
|
||||
|
Loading…
Reference in New Issue
Block a user