diff options
author | Jarrod Millman <millman@berkeley.edu> | 2007-11-26 05:37:46 +0000 |
---|---|---|
committer | Jarrod Millman <millman@berkeley.edu> | 2007-11-26 05:37:46 +0000 |
commit | 3fe715c0d0deb78ace46c3dbaf3165e8c4283e3c (patch) | |
tree | 069bd229c62c5e05030c2063533c98e2aba76e59 /numpy/lib/utils.py | |
parent | 5eabfa765d5aa1d33fd2e8704dfb4bfbdb25761b (diff) | |
download | numpy-3fe715c0d0deb78ace46c3dbaf3165e8c4283e3c.tar.gz |
replaced apply() with direct function call
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 386506bd6..95dd4f581 100644 --- a/numpy/lib/utils.py +++ b/numpy/lib/utils.py @@ -323,7 +323,7 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'): elif inspect.isfunction(object): name = object.func_name - arguments = apply(inspect.formatargspec, inspect.getargspec(object)) + arguments = inspect.formatargspec(*inspect.getargspec(object)) if len(name+arguments) > maxwidth: argstr = _split_line(name, arguments, maxwidth) @@ -338,7 +338,7 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'): arguments = "()" try: if hasattr(object, '__init__'): - arguments = apply(inspect.formatargspec, inspect.getargspec(object.__init__.im_func)) + arguments = inspect.formatargspec(*inspect.getargspec(object.__init__.im_func)) arglist = arguments.split(', ') if len(arglist) > 1: arglist[1] = "("+arglist[1] @@ -374,7 +374,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 = apply(inspect.formatargspec, inspect.getargspec(object.__call__.im_func)) + arguments = inspect.formatargspec(*inspect.getargspec(object.__call__.im_func)) arglist = arguments.split(', ') if len(arglist) > 1: arglist[1] = "("+arglist[1] @@ -402,7 +402,7 @@ def info(object=None,maxwidth=76,output=sys.stdout,toplevel='numpy'): elif inspect.ismethod(object): name = object.__name__ - arguments = apply(inspect.formatargspec, inspect.getargspec(object.im_func)) + arguments = inspect.formatargspec(*inspect.getargspec(object.im_func)) arglist = arguments.split(', ') if len(arglist) > 1: arglist[1] = "("+arglist[1] |