diff options
Diffstat (limited to 'Doc/ref6.tex')
-rw-r--r-- | Doc/ref6.tex | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/Doc/ref6.tex b/Doc/ref6.tex index 54bfde5..5bd468c 100644 --- a/Doc/ref6.tex +++ b/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@. |