[Tutor] avoid eval how???

Liam Clarke-Hutchinson Liam.Clarke-Hutchinson at business.govt.nz
Thu Nov 3 20:31:37 CET 2005

Oops, I see I just doubled up on Danny's advice. 

Liam Clarke-Hutchinson| Contact Centre Advisor| Ministry of Economic
DDI +64 3 962 2639 | Fax +64 3 962 6220
 <http://www.med.govt.nz/> www.med.govt.nz 

-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
Of Pujo Aji
Sent: Thursday, 3 November 2005 10:03 p.m.
To: Tutor
Subject: [Tutor] avoid eval how???

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,

A new monthly electronic newsletter covering all aspects of MED's work is now available.  Subscribers can choose to receive news from any or all of seven categories, free of charge: Growth and Innovation, Strategic Directions, Energy and Resources, Business News, ICT, Consumer Issues and Tourism.  See http://news.business.govt.nz for more details.

http://www.govt.nz - connecting you to New Zealand central & local government services

Any opinions expressed in this message are not necessarily those of the Ministry of Economic Development. This message and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivery to the intended recipient, be advised that you have received this message in error and that any use is strictly prohibited. Please contact the sender and delete the message and any attachment from your computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051104/1c2cc12a/attachment.htm

More information about the Tutor mailing list