2005/10/5, Chris Withers <[EMAIL PROTECTED]>:
> Peter Bengtsson wrote:
> > 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 wouldn't trust that either ;-)
>
> hasattr's insane in that
Peter Bengtsson wrote:
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 wouldn't trust that either ;-)
hasattr's insane in that it catches prettymuch all exception, including
ConflictErrors
2005/10/4, Chris Withers <[EMAIL PROTECTED]>:
> 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
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...
Chris
--
Simplistix - Content
http://zopelabs.com/cookbook/1002891491
2005/10/4, Alex Renier <[EMAIL PROTECTED]>:
> 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, but it
> returns true because it looks down
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, but it
returns true because it looks down the hierarchy and
sees the property in folder1. is there a way to check
f