[Zope-dev] aq_parent not available in __setattr__

Brian Oliver beef005@hotmail.com
Tue, 05 Feb 2002 22:42:59 +1000


1. I need to track changes to particular attributes of an object in a python 
based product.

2. I redefine __setattr__ to perform the necessary operations.

    def __setattr__(self, name, value):
        "some nice comments"

        #pre-processing

        #store the specified attribute
        self.__dict__[name] = value
        self._p_changed = 1

        #post-processing

3. All works fine until I need to access the aq_parent attribute.

4. When I attempt use self.aq_parent, I get an AttributeError exception.

Any ideas?

-- Brian

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx