summaryrefslogtreecommitdiffstats
path: root/Lib/xreload.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xreload.py')
-rw-r--r--Lib/xreload.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/xreload.py b/Lib/xreload.py
index 8d2dfc0..0730be5 100644
--- a/Lib/xreload.py
+++ b/Lib/xreload.py
@@ -118,8 +118,8 @@ def _update_function(oldfunc, newfunc):
"""Update a function object."""
oldfunc.__doc__ = newfunc.__doc__
oldfunc.__dict__.update(newfunc.__dict__)
- oldfunc.func_code = newfunc.func_code
- oldfunc.func_defaults = newfunc.func_defaults
+ oldfunc.__code__ = newfunc.__code__
+ oldfunc.__defaults__ = newfunc.__defaults__
# XXX What else?
return oldfunc