[Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.168,1.169

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Tue Aug 3 07:18:01 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13411/lib

Modified Files:
	libfuncs.tex 
Log Message:
Document general mappings for the locals argument for exec and execfile().

Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.168
retrieving revision 1.169
diff -C2 -d -r1.168 -r1.169
*** libfuncs.tex	2 Aug 2004 06:09:52 -0000	1.168
--- libfuncs.tex	3 Aug 2004 05:17:58 -0000	1.169
***************
*** 344,354 ****
    rarely so does not warrant being made into a statement.}
  
!   The arguments are a file name and two optional dictionaries.  The
!   file is parsed and evaluated as a sequence of Python statements
!   (similarly to a module) using the \var{globals} and \var{locals}
!   dictionaries as global and local namespace.  If the \var{locals}
!   dictionary is omitted it defaults to the \var{globals} dictionary.
!   If both dictionaries are omitted, the expression is executed in the
!   environment where \function{execfile()} is called.  The return value is
    \code{None}.
  
--- 344,355 ----
    rarely so does not warrant being made into a statement.}
  
!   The arguments are a file name and two optional dictionaries.  The file is
!   parsed and evaluated as a sequence of Python statements (similarly to a
!   module) using the \var{globals} and \var{locals} dictionaries as global and
!   local namespace. If provided, \var{locals} can be any mapping object.
!   \versionchanged[formerly \var{locals} was required to be a dictionary]{2.4}
!   If the \var{locals} dictionary is omitted it defaults to the \var{globals}
!   dictionary. If both dictionaries are omitted, the expression is executed in
!   the environment where \function{execfile()} is called.  The return value is
    \code{None}.
  



More information about the Python-checkins mailing list