[Tutor] avoid eval how???
Colin J. Williams
cjw at sympatico.ca
Thu Nov 3 15:12:23 CET 2005
Pujo Aji wrote:
> 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.
Why avoid? It seems the simplest way.
Colin W.
>
> Example :
> L = ['x+sin(x)', '1/(2.2 + pow(2,3)/sin(30)']
>
>
> Sincerely Yours,
> pujo
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
More information about the Tutor
mailing list