summaryrefslogtreecommitdiffstats
path: root/Doc/ref
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-12 00:43:29 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-12 00:43:29 (GMT)
commit016880229a369a3fb419f3eed28b6db7c342fe71 (patch)
tree9b11de5c197bc556dd515e035327673765cd4871 /Doc/ref
parent41eaedd3613cebc83e6b9925499369992c7a7770 (diff)
downloadcpython-016880229a369a3fb419f3eed28b6db7c342fe71.zip
cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.gz
cpython-016880229a369a3fb419f3eed28b6db7c342fe71.tar.bz2
Kill execfile(), use exec() instead
Diffstat (limited to 'Doc/ref')
-rw-r--r--Doc/ref/ref4.tex7
-rw-r--r--Doc/ref/ref6.tex7
2 files changed, 6 insertions, 8 deletions
diff --git a/Doc/ref/ref4.tex b/Doc/ref/ref4.tex
index 9ae8bfa..6ec60f8 100644
--- a/Doc/ref/ref4.tex
+++ b/Doc/ref/ref4.tex
@@ -19,8 +19,7 @@ block. A script file (a file given as standard input to the
interpreter or specified on the interpreter command line the first
argument) is a code block. A script command (a command specified on
the interpreter command line with the `\strong{-c}' option) is a code
-block. The file read by the built-in function \function{execfile()}
-is a code block. The string argument passed to the built-in functions
+block. The string argument passed to the built-in functions
\function{eval()} and \function{exec()} is a code block.
The expression read and evaluated by the built-in function
\function{input()} is a code block.
@@ -139,7 +138,7 @@ If the wild card form of import --- \samp{import *} --- is used in a
function and the function contains or is a nested block with free
variables, the compiler will raise a \exception{SyntaxError}.
-The \function{eval()}, \function{exec()}, \function{execfile()},
+The \function{eval()}, \function{exec()},
and \function{input()} functions do not have access to the
full environment for resolving names. Names may be resolved in the
local and global namespaces of the caller. Free variables are not
@@ -147,7 +146,7 @@ resolved in the nearest enclosing namespace, but in the global
namespace.\footnote{This limitation occurs because the code that is
executed by these operations is not available at the time the
module is compiled.}
-The \function{exec()}, \function{eval()} and \function{execfile()}
+The \function{exec()} and \function{eval()}
functions have optional arguments to override
the global and local namespace. If only one namespace is specified,
it is used for both.
diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex
index 60e7b02..1139005 100644
--- a/Doc/ref/ref6.tex
+++ b/Doc/ref/ref6.tex
@@ -760,8 +760,8 @@ import __future__ [as name]
That is not a future statement; it's an ordinary import statement with
no special semantics or syntax restrictions.
-Code compiled by calls to the builtin functions \function{exec()},
-\function{compile()} and \function{execfile()} that occur in a module
+Code compiled by calls to the builtin functions \function{exec()} and
+\function{compile()} that occur in a module
\module{M} containing a future statement will, by default, use the new
syntax or semantics associated with the future statement. This can,
starting with Python 2.2 be controlled by optional arguments to
@@ -811,9 +811,8 @@ string or code object supplied to the builtin \function{exec()} function
does not affect the code block \emph{containing} the function call,
and code contained in such a string is unaffected by \keyword{global}
statements in the code containing the function call. The same applies to the
-\function{eval()}, \function{execfile()} and \function{compile()} functions.
+\function{eval()} and \function{compile()} functions.
\bifuncindex{exec}
\bifuncindex{eval}
-\bifuncindex{execfile}
\bifuncindex{compile}