[Scipy-svn] r3539 - trunk/scipy/weave

scipy-svn@scip... scipy-svn@scip...
Tue Nov 13 22:21:18 CST 2007


Author: jarrod.millman
Date: 2007-11-13 22:21:13 -0600 (Tue, 13 Nov 2007)
New Revision: 3539

Modified:
   trunk/scipy/weave/inline_tools.py
Log:
applying patch from Fernando P., which corrects my braino and more


Modified: trunk/scipy/weave/inline_tools.py
===================================================================
--- trunk/scipy/weave/inline_tools.py	2007-11-14 04:14:24 UTC (rev 3538)
+++ trunk/scipy/weave/inline_tools.py	2007-11-14 04:21:13 UTC (rev 3539)
@@ -57,27 +57,21 @@
                  init_values + parse_tuple
 
     def arg_declaration_code(self):
-        arg_strings = []
-        for arg in self.arg_specs:
-            arg_strings.append(arg.declaration_code(inline=1))
-        code = arg_strings.join("")
-        return code
+        """Return the declaration code as a string."""
+        arg_strings = [arg.declaration_code(inline=1)
+                       for arg in self.arg_specs]
+        return "".join(arg_strings)
 
     def arg_cleanup_code(self):
-        arg_strings = []
-        for arg in self.arg_specs:
-            arg_strings.append(arg.cleanup_code())
-        code = arg_strings.join("")
-        return code
+        """Return the cleanup code as a string."""
+        arg_strings = [arg.cleanup_code() for arg in self.arg_specs]
+        return "".join(arg_strings)
 
     def arg_local_dict_code(self):
-        arg_strings = []
-        for arg in self.arg_specs:
-            arg_strings.append(arg.local_dict_code())
-        code = arg_strings.join("")
-        return code
+        """Return the code to create the local dict as a string."""
+        arg_strings = [arg.local_dict_code() for arg in self.arg_specs]
+        return "".join(arg_strings)
 
-
     def function_code(self):
         from ext_tools import indent
         decl_code = indent(self.arg_declaration_code(),4)



More information about the Scipy-svn mailing list