Re: [Zope] Accessing CURRENT property

2005-10-05 Thread Peter Bengtsson
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

Re: [Zope] Accessing CURRENT property

2005-10-05 Thread Chris Withers
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

Re: [Zope] Accessing CURRENT property

2005-10-04 Thread Peter Bengtsson
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

Re: [Zope] Accessing CURRENT property

2005-10-04 Thread Chris Withers
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

Re: [Zope] Accessing CURRENT property

2005-10-04 Thread Peter Bengtsson
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

Re: [Zope] Accessing CURRENT property

2005-10-03 Thread robert rottermann
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