[Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.124,1.125

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Mon, 16 Dec 2002 17:08:08 -0800


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

Modified Files:
	libfuncs.tex 
Log Message:
Fix SF # 641111, Undocumented side effect of eval

Try to clear up confusion about the current globals being copied
into a globals dict passed to eval().  This wording (more or less)
was suggested in bug report.  It should probably be made clearer.

Backport candidate.


Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** libfuncs.tex	17 Dec 2002 01:02:57 -0000	1.124
--- libfuncs.tex	17 Dec 2002 01:08:06 -0000	1.125
***************
*** 315,319 ****
    expression (technically speaking, a condition list) using the
    \var{globals} and \var{locals} dictionaries as global and local name
!   space.  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 \keyword{eval} is
--- 315,324 ----
    expression (technically speaking, a condition list) using the
    \var{globals} and \var{locals} dictionaries as global and local name
!   space.  If the \var{globals} dictionary is present and lacks
!   '__builtins__', the current globals are copied into \var{globals} before
!   \var{expression} is parsed.  This means that \var{expression}
!   normally has full access to the standard
!   \refmodule[builtin]{__builtin__} module and restricted environments
!   are propagated.  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 \keyword{eval} is