diff options
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r-- | numpy/lib/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py index 820e6d8f9..97f8358aa 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -86,8 +86,8 @@ if sys.version_info < (2, 4): # Can't set __name__ in 2.3 import new def _set_function_name(func, name): - func = new.function(func.func_code, func.func_globals, - name, func.func_defaults, func.func_closure) + func = new.function(func.__code__, func.__globals__, + name, func.__defaults__, func.__closure__) return func else: def _set_function_name(func, name): @@ -122,7 +122,7 @@ class _Deprecate(object): import warnings if old_name is None: try: - old_name = func.func_name + old_name = func.__name__ except AttributeError: old_name = func.__name__ if new_name is None: @@ -541,7 +541,7 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'): print >> output, "\n *** Total of %d references found. ***" % numfound elif inspect.isfunction(object): - name = object.func_name + name = object.__name__ arguments = inspect.formatargspec(*inspect.getargspec(object)) if len(name+arguments) > maxwidth: |