[Zope-dev] Re: ZPatterns: __getitem__ on a DataSkin instance
Steve Alexander
steve@cat-box.net
Fri, 05 Jan 2001 21:52:16 +0000
Steve Spicklemire wrote:
> Hi Steve,
>
> Hmm.. is the 'id' of your PythonScript also getattr?
Yes. I forgot to mention that. And, I realized just after posting the
email to the list that calling a method "getattr" is asking for trouble :-)
Actually, my workaround doesn't work except in the most trivial cases.
My code was making more errors as Zope tried to look up the _ variable
via __getitem__ and thus via my PythonScript.
I've ended up using a dtml-if to choose whether to use a <dtml-with
stuff mapping> block or just a plain <dtml-with stuff> block.
I'd still like to know why a Dataskin from a specialist is behaving
differently from one in the ZODB in this respect.
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net