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

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Feb 2 00:06:44 EST 2011


Author: warren.weckesser
Date: 2011-02-01 23:06:44 -0600 (Tue, 01 Feb 2011)
New Revision: 7119

Modified:
   trunk/scipy/weave/ast_tools.py
   trunk/scipy/weave/bytecodecompiler.py
Log:
PY3: weave: Eliminate use of map(None, ...)

Modified: trunk/scipy/weave/ast_tools.py
===================================================================
--- trunk/scipy/weave/ast_tools.py	2011-01-31 23:06:30 UTC (rev 7118)
+++ trunk/scipy/weave/ast_tools.py	2011-02-02 05:06:44 UTC (rev 7119)
@@ -180,7 +180,7 @@
         return (pattern == data), vars
     if len(data) != len(pattern):
         return 0, vars
-    for pattern, data in map(None, pattern, data):
+    for pattern, data in zip(pattern, data):
         same, vars = match(pattern, data, vars)
         if not same:
             break

Modified: trunk/scipy/weave/bytecodecompiler.py
===================================================================
--- trunk/scipy/weave/bytecodecompiler.py	2011-01-31 23:06:30 UTC (rev 7118)
+++ trunk/scipy/weave/bytecodecompiler.py	2011-02-02 05:06:44 UTC (rev 7119)
@@ -147,7 +147,7 @@
 # Build one in the reverse sense
 # -----------------------------------------------
 byOpcode = {}
-for name,op in map(None, byName.keys(), byName.values()):
+for name, op in byName.items():
     byOpcode[op] = name
     del name
     del op
@@ -1151,7 +1151,7 @@
         v = self.stack[var_num]
         t = self.types[var_num]
         print 'LOADFAST',var_num,v,t
-        for VV,TT in map(None, self.stack, self.types):
+        for VV, TT in zip(self.stack, self.types):
             print VV,':',TT
         if t is None:
             raise TypeError('%s used before set?' % v)




More information about the Scipy-svn mailing list