[Zope] Accessing CURRENT property

Peter Bengtsson peter at fry-it.com
Tue Oct 4 17:56:21 EDT 2005


2005/10/4, Chris Withers <chris at simplistix.co.uk>:
> Alex Renier wrote:
> > Hello,
> > if I have a folder1 in a folder2 and my folder 1 has a
> > certain property.  If I want to know if folder2 has
> > the property I use hasattr() method on folder2,
>
> Just a note in passing, hasattr is very dangerous to use in a Zope 2
> context...
>
Not sure what it's called in Page Templates or Python Scripts but in
DTML it's called careful_hasattr() which wraps hasattr() in a
restricted context.
I'm sure TALES and Python Scripts too.

> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
>             - http://www.simplistix.co.uk
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Zope mailing list