diff options
author | njsmith <njs@pobox.com> | 2013-02-28 11:15:09 -0800 |
---|---|---|
committer | njsmith <njs@pobox.com> | 2013-02-28 11:15:09 -0800 |
commit | e1c7c4df0c7afb0baff683c7e3a1f4b205d6e572 (patch) | |
tree | e191df1d34650c96ab87e128020224c123374878 /numpy/lib/utils.py | |
parent | 2cb5021f2110f7e24a6a30a3a0af8336f46fb621 (diff) | |
parent | 80af580d76cbd18a5c91851d8b404636d8acd2a9 (diff) | |
download | numpy-e1c7c4df0c7afb0baff683c7e3a1f4b205d6e572.tar.gz |
Merge pull request #3059 from charris/2to3-funcattrs
2to3: Apply `funcattrs` fixer. Closes #3058.
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: |