On Apr 14, 4:23 pm, Janto Dreijer <[EMAIL PROTECTED]> wrote:
> It seems eval is modifying the passed in locals/globals. This is
> behaviour I did not expect and is really messing up my web.py app.

Reading the documentation would be a good start:

>From http://docs.python.org/lib/built-in-funcs.html:

eval(   expression[, globals[, locals]])
The arguments are a string and optional globals and locals. If
provided, globals must be a dictionary. If provided, locals can be any
mapping object. Changed in version 2.4: formerly locals was required
to be a dictionary.
The expression argument is parsed and evaluated as a Python expression
(technically speaking, a condition list) using the globals and locals
dictionaries as global and local name space. If the globals dictionary
is present and lacks '__builtins__', the current globals are copied
into globals before expression is parsed.

--
Arnaud

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to