summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2006-06-15 18:58:59 +0000
committercookedm <cookedm@localhost>2006-06-15 18:58:59 +0000
commitb05d85bd8d6dc1fde66ee40b99be66a338d96424 (patch)
treeadbd6a4d55cea26dd51a7ab65f38e3c99611eedc /numpy/lib/utils.py
parent1174b739acf3637626ef216f970bee84e545fe99 (diff)
downloadnumpy-b05d85bd8d6dc1fde66ee40b99be66a338d96424.tar.gz
Fix deprecated for when the function doesn't have a __dict__
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 1304adb42..43ccef5cd 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -41,5 +41,10 @@ def deprecate(func, oldname, newname):
else:
doc = '\n'.join([depdoc, doc])
newfunc.__doc__ = doc
- newfunc.__dict__.update(func.__dict__)
+ try:
+ d = func.__dict__
+ except AttributeError:
+ pass
+ else:
+ newfunc.__dict__.update(d)
return newfunc