[Python-checkins] CVS: python/dist/src/Doc/ref ref4.tex,1.24,1.25
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 01 Feb 2001 18:43:20 -0800
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv25539/ref
Modified Files:
ref4.tex
Log Message:
Minor markup adjustments.
Move some index entries next to what they are referring to for better
"targetting".
Index: ref4.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref4.tex,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** ref4.tex 2001/02/01 15:37:56 1.24
--- ref4.tex 2001/02/02 02:43:18 1.25
***************
*** 25,31 ****
function \function{execfile()} is a code block. The string argument
passed to the built-in function \function{eval()} and to the
! \keyword{exec} statement is a code block. And finally, the expression
! read and evaluated by the built-in function \function{input()} is a
! code block.
A code block is executed in an execution frame. An \dfn{execution
--- 25,31 ----
function \function{execfile()} is a code block. The string argument
passed to the built-in function \function{eval()} and to the
! \keyword{exec}\stindex{exec} statement is a code block. And finally,
! the expression read and evaluated by the built-in function
! \function{input()} is a code block.
A code block is executed in an execution frame. An \dfn{execution
***************
*** 87,94 ****
Whether a name is local or global in a code block is determined by
static inspection of the source text for the code block: in the
! absence of \keyword{global} statements, a name that is bound anywhere
! in the code block is local in the entire code block; all other names
! are considered global. The \keyword{global} statement forces global
! interpretation of selected names throughout the code block.
The following constructs bind names: formal parameters to functions,
--- 87,95 ----
Whether a name is local or global in a code block is determined by
static inspection of the source text for the code block: in the
! absence of \keyword{global}\stindex{global} statements, a name that is
! bound anywhere in the code block is local in the entire code block;
! all other names are considered global. The \keyword{global} statement
! forces global interpretation of selected names throughout the code
! block.
The following constructs bind names: formal parameters to functions,
***************
*** 98,104 ****
header, or in the second position of an \keyword{except} clause
header. The \keyword{import} statement of the form ``\samp{from
! \ldots import *}'' binds all names defined in the imported module,
! except those beginning with an underscore. This form may only be used
! at the module level.
A target occurring in a \keyword{del} statement is also considered bound
--- 99,105 ----
header, or in the second position of an \keyword{except} clause
header. The \keyword{import} statement of the form ``\samp{from
! \ldots import *}''\stindex{from} binds all names defined in the
! imported module, except those beginning with an underscore. This form
! may only be used at the module level.
A target occurring in a \keyword{del} statement is also considered bound
***************
*** 111,123 ****
namespace of the module \module{__builtin__}\refbimodindex{__builtin__}).
The built-in namespace associated with the execution of a code block
! is actually found by looking up the name \code{__builtins__} is its
global namespace; this should be a dictionary or a module (in the
! latter case its dictionary is used). Normally, the
\code{__builtins__} namespace is the dictionary of the built-in module
\module{__builtin__} (note: no `s'). If it isn't, restricted
execution\indexii{restricted}{execution} mode is in effect.
- \stindex{from}
- \stindex{exec}
- \stindex{global}
The namespace for a module is automatically created the first time a
--- 112,121 ----
namespace of the module \module{__builtin__}\refbimodindex{__builtin__}).
The built-in namespace associated with the execution of a code block
! is actually found by looking up the name \code{__builtins__} in its
global namespace; this should be a dictionary or a module (in the
! latter case the module's dictionary is used). Normally, the
\code{__builtins__} namespace is the dictionary of the built-in module
\module{__builtin__} (note: no `s'). If it isn't, restricted
execution\indexii{restricted}{execution} mode is in effect.
The namespace for a module is automatically created the first time a