[pypy-svn] r58241 - pypy/branch/tuple-nonresizable-395/pypy/module/_sre

arigo at codespeak.net arigo at codespeak.net
Fri Sep 19 19:52:38 CEST 2008


Author: arigo
Date: Fri Sep 19 19:52:37 2008
New Revision: 58241

Modified:
   pypy/branch/tuple-nonresizable-395/pypy/module/_sre/interp_sre.py
Log:
Revert this change.  If it really makes a difference then there is
a bug in the list-comprehension-detection code (which should see
both versions as identical as far as I can tell).


Modified: pypy/branch/tuple-nonresizable-395/pypy/module/_sre/interp_sre.py
==============================================================================
--- pypy/branch/tuple-nonresizable-395/pypy/module/_sre/interp_sre.py	(original)
+++ pypy/branch/tuple-nonresizable-395/pypy/module/_sre/interp_sre.py	Fri Sep 19 19:52:37 2008
@@ -95,10 +95,11 @@
         """Creates a tuple of index pairs representing matched groups, a format
         that's convenient for SRE_Match."""
         space = self.space
-        return space.newtuple([
-            space.newtuple([space.wrap(value1),
-                            space.wrap(value2)])
-            for value1, value2 in self.create_regs(group_count)])
+        lst = []
+        for value1, value2 in self.create_regs(group_count):
+            lst.append(space.newtuple([space.wrap(value1),
+                                       space.wrap(value2)]))
+        return space.newtuple(lst)
     w_create_regs.unwrap_spec = ['self', int]
 
     def fget_start(space, self):



More information about the Pypy-commit mailing list