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

Jeremy Hylton jeremy@zope.com
Mon, 30 Dec 2002 19:15:29 -0500


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

Modified Files:
	function.py 
Log Message:
Remove old fixup code.


=== Zope3/src/zodb/code/function.py 1.2 => 1.3 ===
--- Zope3/src/zodb/code/function.py:1.2	Wed Dec 25 09:12:18 2002
+++ Zope3/src/zodb/code/function.py	Mon Dec 30 19:15:29 2002
@@ -84,30 +84,10 @@
         self._v_side_effect = has_side_effect(func)
         self._pf_module = module
         self._pf_code = {}
-        self._fixup_contained()
 
     def __repr__(self):
         return "<PersistentFunction %s.%s>" % (self._pf_module.__name__,
                                                self._pf_func.func_name)
-
-    def _fixup_contained(self):
-        # The function object may contain other function objects as a
-        # default value for an argument.  These functions are
-        # converted to persistent objects, but are not updated in
-        # place when the containing module is changed.
-        new = {}
-        defaults = self._pf_func.func_defaults
-        if defaults is None:
-            return
-        for i in range(len(defaults)):
-            obj = defaults[i]
-            if isinstance(obj, function):
-                new[i] = PersistentFunction(obj, self._pf_module)
-        if new:
-            new_defs = list(defaults)
-            for i, pf in new.items():
-                new_defs[i] = pf
-            self._pf_func.func_defaults = tuple(new_defs)
 
     # We need attribute hooks to handle access to _pf_ attributes in a
     # special way.  All other attributes should be looked up on