Martijn Pieters wrote:
> 
> Erm. The ExtensionClass.stx documentation hints at a ComputedAttribute
> class (but as an example of how you could use an ExtensionClass). The
> current C implementation of ComputedAttribute is not, as far as I can see,
> documented.

Now I think I know the answer to this one, but I'll ask just to be sure:

class MyClass(Persistent Acquisition.Explicit):

     def _set_your_attribute (self,value):
        self._v_your_attribute = value

     def _get_your_attribute (self):
         return self._v_your_attribute

     your_attribute = ComputedAttribute(_get_your_attribute)

...with this class, your_attribute isn't going to play in Persistence,
is it? (so I can update it lots without worrying about ZODB size
growing... :-)

Hmm... more questions:

If I do:

x = MyClass()
x.your_attribute = 1

...what happens?

Where do you import the ComputedAttribute module from?

cheers,

Chris

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to