converting string to dict ?

Oleg Broytmann phd at phd.fep.ru
Wed Apr 11 06:42:24 EDT 2001


On Wed, 11 Apr 2001, Jason Cunliffe wrote:
> A web input form  passes {'name':'Cleopatra'} as a string.
> Please, is there a nice clean function to convert this string to a dict?

   "eval"

   Please, please send me your URL - I will hack you through your call to the
eval! :)))
   Seriously, do not trust ANYTHING from the web. Do not convert things
into objects, do not eval them - NEVER!

Oleg.
----
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list