[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Zope] How do I get an attribute from object, without aquisition
Max M wrote:
I am trying to get at an attribute from an object. First I check if it
exists via "hasattr(obj, id)" but the problem is that there are other
objects with the id further up in the aquisition chain. So I get some
objects that I don't want.
How do i limit my hasattr() to just an object and not the aquisitioned
attributes ??
hi max,
this should work for you:
hasattr(obj.aq_explicit,id)
greetings, maik.
_______________________________________________
Zope maillist - Zope@xxxxxxxx
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )
This mailing list archive is a service of Copilotco.