Eval (was Re: Question about the use of python as a scripting language)
skip at pobox.com
skip at pobox.com
Thu Aug 10 10:46:37 EDT 2006
Brendon> A shortcut occurs to me; maybe someone can tell me what's wrong
Brendon> with my reasoning here. It seems that any string that is unsafe
Brendon> to pass to eval() must involve a function call, and thus must
Brendon> contain an opening paren. Given that I know that the data I
Brendon> expect contains no parens, would people expect this code to be
Brendon> safe:
Unfortunately, no. If I define a class which has properties, attribute
assignment can involve arbitrary numbers of function calls.
Skip
More information about the Python-list
mailing list