summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-02-28 17:57:32 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-03-01 09:14:19 -0700
commit0a5746d3c22cf296b995476bdc473a4423d7a84d (patch)
tree6848c8631390284f5e5df1e9cf38fe8205314996 /numpy/lib/utils.py
parent02cfcb99bc976a0bfc39529999e2a0200fb9cc2a (diff)
downloadnumpy-0a5746d3c22cf296b995476bdc473a4423d7a84d.tar.gz
2to3: Apply `methodattrs` fixes.
Replaces old style `f.im_func` and `f.im_class` method attributes with `f.__func__` and `f.__class__`. Closes #3070.
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 97f8358aa..fbb295ed2 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -557,7 +557,7 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'):
arguments = "()"
try:
if hasattr(object, '__init__'):
- arguments = inspect.formatargspec(*inspect.getargspec(object.__init__.im_func))
+ arguments = inspect.formatargspec(*inspect.getargspec(object.__init__.__func__))
arglist = arguments.split(', ')
if len(arglist) > 1:
arglist[1] = "("+arglist[1]
@@ -593,7 +593,7 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'):
print >> output, "Instance of class: ", object.__class__.__name__
print >> output
if hasattr(object, '__call__'):
- arguments = inspect.formatargspec(*inspect.getargspec(object.__call__.im_func))
+ arguments = inspect.formatargspec(*inspect.getargspec(object.__call__.__func__))
arglist = arguments.split(', ')
if len(arglist) > 1:
arglist[1] = "("+arglist[1]
@@ -621,7 +621,7 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'):
elif inspect.ismethod(object):
name = object.__name__
- arguments = inspect.formatargspec(*inspect.getargspec(object.im_func))
+ arguments = inspect.formatargspec(*inspect.getargspec(object.__func__))
arglist = arguments.split(', ')
if len(arglist) > 1:
arglist[1] = "("+arglist[1]