[Zope-dev] ZODB now supports user-defined __get/set/delattr__ methods

Phillip J. Eby pje@telecommunity.com
Tue, 16 May 2000 18:35:25 -0500


At 02:02 PM 5/16/00 -0400, Jim Fulton wrote:
>
>I've just checked in some changes to ExtensionClass, 
>and ZODB in the Zope CVS tree that provide support 
>for user-defined (python) __get/set/delattr__ methods.  
>These methods now have the same semantics as they do 
>in standard Python classes.  
>
>This means that you can define your own 
>__get/set/delattr__ hooks and they will automatically
>work with, rather than break, the persistence system's
>use of the low-level attribute hooks.

[roar of applause]


>These changes are available in the Zope public CVS 
>and will be available in future 
>Zope releases, including 2.2 and it's beta releases. 
>The changes are not in the 2.2 alpha1 release.

Just out of curiosity, was this inspired by DynPersist.c as released in
ZPatterns 0.3.0 the week before last?  I can see that your solution to the
problem goes much deeper than just getting attr hooks for persistence as my
simple hack did.  But I was just curious if perhaps you saw my hack and
decided that it would be better to put it directly into the base class.
Certainly it'll be better for me and for users of ZPatterns, since I'll be
able to phase out DynPersist.c for Zope 2.2.