newbie: generate a function based on an expression

Paul Rubin http
Tue Dec 13 15:41:05 EST 2005


"Jacob Rael" <jacob.rael at gmail.com> writes:
> I read about the security concerns involved in using eval(). I don't
> expect this project to grow to the point where I require a web
> interface. However, since I am learning, I might as well learn the
> right way.

I think you're going to have to write an actual parser and evaluator.
There are various tools that can help you do that (PyParse, etc.)  but
if it's for a learning project, you might like to try doing it from
scratch.



More information about the Python-list mailing list