Storing dictionary locations as a string and using eval - alternatives?

Peter Otten __peter__ at web.de
Thu Aug 20 09:14:31 CEST 2015


dieter wrote:

> Victor Hooi <victorhooi at gmail.com> writes:
>> ...
> I did not read your message body - just your "subject".

That was a mistake ;)

> Instead of (the potentially insecure) "eval", I use "json.loads"
> (combined with a "json.dumps" to get the "json" representation).
> See the "json" module documentation.




More information about the Python-list mailing list