[Python-checkins] CVS: python/dist/src/Doc/lib libfuncs.tex,1.87,1.88

Tim Peters tim_one@users.sourceforge.net
Sat, 29 Sep 2001 23:33:01 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv32238/python/Doc/lib

Modified Files:
	libfuncs.tex 
Log Message:
The execfile() docs imply it acts on locals same as exec.  But in truth
it acts more like assigning to keys in locals(), i.e. modifications to
function locals aren't reflected in the locals when execfile() returns.


Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** libfuncs.tex	2001/09/30 06:18:26	1.87
--- libfuncs.tex	2001/09/30 06:32:59	1.88
***************
*** 258,261 ****
--- 258,268 ----
    environment where \function{execfile()} is called.  The return value is
    \code{None}.
+ 
+   \strong{Warning:} The default \var{locals} act as described for function
+   \function{locals()} below:  modifications to the default \var{locals}
+   dictionary should not be attempted.  Pass an explicit \var{locals}
+   dictionary if you need to see effects of the code on \var{locals} after
+   function \function{execfile()} returns.  \function{execfile()} cannot
+   be used reliably to modify a function's locals.
  \end{funcdesc}