[Tutor] avoid eval how???

Pujo Aji ajikoe at gmail.com
Thu Nov 3 10:02:32 CET 2005


Hello
 I have a dynamic functions which created by some algorithms during runtime.
These functions are in string type.
When I want to use it, I can use eval command.
But can someone give me more suggestion about how to handle this problem, I
want to avoid eval.
 Example :
L = ['x+sin(x)', '1/(2.2 + pow(2,3)/sin(30)']
  Sincerely Yours,
pujo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051103/90a9aea7/attachment.htm


More information about the Tutor mailing list