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

dieter dieter at handshake.de
Thu Aug 20 01:57:57 EDT 2015


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

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