From: "Joachim Werner" <[EMAIL PROTECTED]>

> > This is true in the ZODB, but can be complicated by acquisition. If an
> > object can acquire itself, it can cause issues. Plus it becomes
> > difficult to know whether objects are clones or just identical
> > instances, although this can be mitigated by exposing their Python
> > instance id.
>
> Acquisition is very cool, but it sometimes really sucks ... AFAIK you can
> easily "switch it off" in your own Python products. But I am still
fighting
> with only getting private variables (i.e. not acquired ones) in DTML ...
>
>

>From DTML I have used 2 different methods for this:
1) 
<dtml-with expr="object" only>
 .....
</dtml-with>

or
2) 
<dtml-if expr="_.hostattr(object.aq_explicit('attribute')">
   .......
</dtml-if>

In both cases 'object' is the thing with the 'private variables' and in 2),
'attribute' is the 'variable' name.
Jeff




_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to