Author: Armin Rigo <[email protected]>
Branch:
Changeset: r60226:8a7426025407
Date: 2013-01-20 10:57 +0100
http://bitbucket.org/pypy/pypy/changeset/8a7426025407/
Log: Syntax test and fix, part 1.
diff --git a/pypy/interpreter/astcompiler/asthelpers.py
b/pypy/interpreter/astcompiler/asthelpers.py
--- a/pypy/interpreter/astcompiler/asthelpers.py
+++ b/pypy/interpreter/astcompiler/asthelpers.py
@@ -43,7 +43,7 @@
if self.elts:
for elt in self.elts:
elt.set_context(ctx)
- self.ctx = ctx
+ self.ctx = ctx
class __extend__(ast.Attribute):
diff --git a/pypy/interpreter/astcompiler/test/test_compiler.py
b/pypy/interpreter/astcompiler/test/test_compiler.py
--- a/pypy/interpreter/astcompiler/test/test_compiler.py
+++ b/pypy/interpreter/astcompiler/test/test_compiler.py
@@ -782,6 +782,17 @@
source = "for x in y: pass\n" * 1000
compile_with_astcompiler(source, 'exec', self.space)
+ def test_assign_to_empty_list_1(self):
+ source = """if 1:
+ for i in range(5):
+ del []
+ [] = ()
+ [] = []
+ [] = [] = []
+ ok = 1
+ """
+ self.simple_test(source, 'ok', 1)
+
class AppTestCompiler:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit