[pypy-svn] r58257 - pypy/branch/tuple-nonresizable-395/pypy/interpreter/pyparser

arigo at codespeak.net arigo at codespeak.net
Sat Sep 20 12:54:46 CEST 2008


Author: arigo
Date: Sat Sep 20 12:54:46 2008
New Revision: 58257

Modified:
   pypy/branch/tuple-nonresizable-395/pypy/interpreter/pyparser/astbuilder.py
Log:
Same as r58255.


Modified: pypy/branch/tuple-nonresizable-395/pypy/interpreter/pyparser/astbuilder.py
==============================================================================
--- pypy/branch/tuple-nonresizable-395/pypy/interpreter/pyparser/astbuilder.py	(original)
+++ pypy/branch/tuple-nonresizable-395/pypy/interpreter/pyparser/astbuilder.py	Sat Sep 20 12:54:46 2008
@@ -726,17 +726,8 @@
     if len(atoms) <= 2:
         builder.push(atoms[0])
     else:
-        isConst = True
         items = [atoms[index] for index in range(0, len(atoms), 2)]
-        for item in items:
-            if not isinstance(item, ast.Const):
-                isConst = False
-                break
-        if not isConst:
-            builder.push(ast.Tuple([i for i in items if isinstance(i, ast.Node)], atoms[0].lineno))
-        else:
-            builder.push(ast.Const(builder.space.newtuple(
-                [i for i in items if isinstance(i, ast.Const)]), atoms[0].lineno))
+        builder.push(ast.Tuple(items, atoms[0].lineno))
 
 def build_while_stmt(builder, nb):
     """while_stmt: 'while' test ':' suite ['else' ':' suite]"""



More information about the Pypy-commit mailing list