Thanks for your response Johan Alexis Roda points me to the correct solution I use object.hasProperty('someproperty') Cheers -----Original Message----- From: Johan Carlsson <johanc@easypublisher.com> To: Garito <garito@sistes.net>, zope@zope.org Date: Tue, 14 Sep 2004 21:09:24 +0200 Subject: Re: [Zope] hasattr
Garito wrote:
Hi all
I've created a Python Script like class with Catalogawarness and PropertyManager as super classes too
My problems begins when I try to know if these objects has some properties. If I try these:
hasattr(object.aq_explicit, 'someproperty')
Why do you try to get 'someproperty' from acquisition?
Don't you want to check for 'someproperty' in object?
Hence: hasattr(object, 'someproperty')
-- Johan Carlsson Tel: + 46 8 31 24 94 Colliberty Mob: + 46 70 558 25 24 Torsgatan 72 Email: johanc@easypublisher.com SE-113 37 STOCKHOLM