Is Eval *always* Evil?

Robert Kern robert.kern at gmail.com
Wed Nov 10 21:40:11 EST 2010


On 2010-11-10 15:52 , Hrvoje Niksic wrote:
> Simon Mullis<simon at mullis.co.uk>  writes:
>
>> If "eval" is not the way forward, are there any suggestions for
>> another way to do this?
>
> ast.literal_eval might be the thing for you.

No, that doesn't work since he needs to call methods.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list