[Zope] python ignorance shining through...

Tony McDonald tony.mcdonald@ncl.ac.uk
Tue, 14 Sep 1999 14:56:10 +0100


At 8:59 am -0500 14/9/99, Evan Simpson wrote:
>Tony McDonald wrote:
>[snippage]
>
>> >   template_str = eval("self.RENDER.%s.read_raw()" % tagclass)
>
>[bobbit]
>
>This will certainly work, but here's a non-eval solution (I really dislike
>exec-ing and eval-ing):
>
>template_str = getattr(self.RENDER, tagclass).read_raw()

wow. Tres Cool. A multitude of solutions! :)
cheers Evan and Phil.
Tone