1 Mar
2001
1 Mar
'01
6:45 p.m.
Joel Burton writes:
On Wed, 28 Feb 2001, Dieter Maurer wrote:
I many cases, you can use
<dtml-if "_.hasattr(aq_explicit,'attrname')">
or
<dtml-if "_.hasattr(object.aq_explicit,'attrname')">
to check whether the current object or "object", respectively, has attribute "attrname".
In some rare cases, this can give you a "true" result, even though the object does not have an 'attrname'.
To help me understand Zope better (!), what are the 'rare cases' where this would give a false positive? That is difficult to explain.
Search the (searchable) list archive for a post from me titled "unexpected acquisition behavior" (or something similar). Dieter