[Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.165,1.166
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Fri Jul 2 02:41:37 EDT 2004
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18086/Doc/lib
Modified Files:
libfuncs.tex
Log Message:
SF Bug #215126: Over restricted type checking on eval() function
The builtin eval() function now accepts any mapping for the locals argument.
Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing
down the normal case. My timings so no measurable impact.
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.165
retrieving revision 1.166
diff -C2 -d -r1.165 -r1.166
*** libfuncs.tex 5 May 2004 16:49:11 -0000 1.165
--- libfuncs.tex 2 Jul 2004 06:41:04 -0000 1.166
***************
*** 292,297 ****
\begin{funcdesc}{eval}{expression\optional{, globals\optional{, locals}}}
! The arguments are a string and two optional dictionaries. The
! \var{expression} argument is parsed and evaluated as a Python
expression (technically speaking, a condition list) using the
\var{globals} and \var{locals} dictionaries as global and local name
--- 292,301 ----
\begin{funcdesc}{eval}{expression\optional{, globals\optional{, locals}}}
! The arguments are a string and optional globals and locals. If provided,
! \var{globals} must be a dictionary. If provided, \var{locals} can be
! any mapping object. \versionchanged[formerly \var{locals} was required
! to be a dictionary]{2.4}
!
! The \var{expression} argument is parsed and evaluated as a Python
expression (technically speaking, a condition list) using the
\var{globals} and \var{locals} dictionaries as global and local name
More information about the Python-checkins
mailing list