[Zope3-checkins] CVS: Zope3/src/zodb/code - function.py:1.6.36.2

Jim Fulton jim at zope.com
Wed Jan 28 11:19:09 EST 2004


Update of /cvs-repository/Zope3/src/zodb/code
In directory cvs.zope.org:/tmp/cvs-serv25006

Modified Files:
      Tag: zope3-zodb3-devel-branch
	function.py 
Log Message:
Updated to work with new api for overriding attr methods.


=== Zope3/src/zodb/code/function.py 1.6.36.1 => 1.6.36.2 ===
--- Zope3/src/zodb/code/function.py:1.6.36.1	Fri Jan 16 10:43:29 2004
+++ Zope3/src/zodb/code/function.py	Wed Jan 28 11:19:08 2004
@@ -108,9 +108,7 @@
         return getattr(self._pf_func, attr)
 
     def __setattr__(self, attr, value):
-        if attr[:3].startswith('_p_'):
-            Persistent.__setattr__(self, attr, value)
-        else:
+        if not self._p_setattr(attr, value):
             # the persistence machinery didn't handle this attribute,
             # it must be ours
             if attr.startswith('_pf_'):
@@ -130,6 +128,8 @@
                 del self.__dict__[attr]
             else:
                 delattr(self._pf_func, attr)
+            if not attr.startswith('_v_'):
+                self._p_changed = 1
 
     def __call__(self, *args, **kwargs):
         # We must make sure that _module is loaded when func is




More information about the Zope3-Checkins mailing list