Safe eval?

Philipp Lenssen lenssen at hitnet.rwth-aachen.de
Wed Apr 17 03:20:16 EDT 2002


"Geoff Gerrietts" <geoff at gerrietts.net> wrote in message
news:mailman.1018995393.20362.python-list at python.org...
>..
> I'd give some serious consideration to Andrew Dalke's solution, too.
> That may be a quicker route to exactly where my complicated route gets
> you -- I think that when I wrote this, I'd tried eval(string, {}, {})
> and never even considered replacing the __builtins__ namespace with an
> empty dictionary.
>
> I'm considering refactoring, myself....
>..

OK. In the end I will probably try to play around with the different
approaches, and your code, until I understand what's happening (that's
always good). Then I might be able to rebuild a small solution from scratch.





More information about the Python-list mailing list