eval() == evil? --- How to use it safely?

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Thu Aug 28 15:57:58 EDT 2008


Fett a écrit :
> I am creating a program that requires some data that must be kept up
> to date. What I plan is to put this data up on a web-site then have
> the program periodically pull the data off the web-site.
> 
> My problem is that when I pull the data (currently stored as a
> dictionary on the site) off the site, it is a string, I can use eval()

Short answer: use json as the format for data transfer.



More information about the Python-list mailing list