How to convert string to list without eval or exec

Peter Otten __peter__ at web.de
Wed Mar 10 07:57:53 EST 2004


DomF wrote:

>> > I'm not allowed to use eval or exec.
>>
>> - write to a file
>> - load the file as module :-)
> 
> This made me laugh out loud after reading all the heavy duty parsing
> options, is that bad?

It's just like eval and exec in that it allows to execute untrusted code.

Peter



More information about the Python-list mailing list