[Numpy-svn] r4507 - trunk/numpy/lib

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Nov 26 00:37:49 EST 2007


Author: jarrod.millman
Date: 2007-11-25 23:37:46 -0600 (Sun, 25 Nov 2007)
New Revision: 4507

Modified:
   trunk/numpy/lib/utils.py
Log:
replaced apply() with direct function call


Modified: trunk/numpy/lib/utils.py
===================================================================
--- trunk/numpy/lib/utils.py	2007-11-26 05:08:55 UTC (rev 4506)
+++ trunk/numpy/lib/utils.py	2007-11-26 05:37:46 UTC (rev 4507)
@@ -323,7 +323,7 @@
 
     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 @@
         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 @@
         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 @@
 
     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]




More information about the Numpy-svn mailing list