[Zope] python ignorance shining through...

Phil Harris phil@philh.org
Tue, 14 Sep 1999 14:53:13 +0100


Yep, that's neat!

See ya

Phil
----- Original Message -----
From: Evan Simpson <evan@4-am.com>
To: Tony McDonald <tony.mcdonald@ncl.ac.uk>
Cc: Phil Harris <phil@philh.org>; Zope List <zope@zope.org>
Sent: Tuesday, September 14, 1999 2:59 PM
Subject: Re: [Zope] python ignorance shining through...


> 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()
>
>