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

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Aug 29 10:55:56 EDT 2008


On Fri, 29 Aug 2008 05:42:46 -0700, Fett wrote:

> On Aug 28, 7:57 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> 
> So long story short: if I am expecting a dictionary of strings, I should
> make a parser that only accepts a dictionary of strings then. There is
> no safe way to use an existing construct.

You may find the code here useful:

http://effbot.org/zone/simple-iterator-parser.htm


-- 
Steven



More information about the Python-list mailing list