diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 11:32:12 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-02-28 11:32:12 -0700 |
commit | 80af580d76cbd18a5c91851d8b404636d8acd2a9 (patch) | |
tree | b3ef41697787a2266c745995a59485b8762fbd6c /numpy/compat | |
parent | 0934653e151969f6912c911b5113306bd5f450f1 (diff) | |
download | numpy-80af580d76cbd18a5c91851d8b404636d8acd2a9.tar.gz |
2to3: Apply `funcattrs` fixer. Closes #3058.
This replaces the `b.func_xxxx` with newer `__xxxx__` attribute names
For example, `f.__name__` replaces `f.func_name`
Diffstat (limited to 'numpy/compat')
-rw-r--r-- | numpy/compat/_inspect.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/compat/_inspect.py b/numpy/compat/_inspect.py index 612d1e147..4fee50814 100644 --- a/numpy/compat/_inspect.py +++ b/numpy/compat/_inspect.py @@ -128,8 +128,8 @@ def getargspec(func): func = func.im_func if not isfunction(func): raise TypeError('arg is not a Python function') - args, varargs, varkw = getargs(func.func_code) - return args, varargs, varkw, func.func_defaults + args, varargs, varkw = getargs(func.__code__) + return args, varargs, varkw, func.__defaults__ def getargvalues(frame): """Get information about arguments passed into a particular frame. @@ -209,8 +209,8 @@ if __name__ == '__main__': def foo(x, y, z=None): return None - print inspect.getargs(foo.func_code) - print getargs(foo.func_code) + print inspect.getargs(foo.__code__) + print getargs(foo.__code__) print inspect.getargspec(foo) print getargspec(foo) |