From 3fe715c0d0deb78ace46c3dbaf3165e8c4283e3c Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Mon, 26 Nov 2007 05:37:46 +0000 Subject: replaced apply() with direct function call --- numpy/lib/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'numpy/lib/utils.py') 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] -- cgit v1.2.1