[Tutor] Re: My best GUI app so far.
Jonathan Hayward
jonathan.hayward at pobox.com
Wed Jan 12 00:07:41 CET 2005
Jacob S wrote.
> I try to avoid using eval() wherever possible, which is almost
> everywhere. ;) There's a huge security hole in using eval() on
> arbitrary strings, and it's not the greatest performance either.
> (Each invocation of eval() will generate bytecode and create a code
> object that does essentially the same thing as my explicit conversion
> code does, so by doing it manually you save a parsing/compiling step.)
> You're not eval()ing arbitrary strings here, at least, but it's
> still good practice to only use eval() when absolutely necessary.
So, then, are you of the camp that believes that "a necessary eval() is
still an eval()"? Quite a lot of good philosophers would agree with you!
--
++ Jonathan Hayward, jonathan.hayward at pobox.com
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
More information about the Tutor
mailing list