Author: Romain Guillebert <romain...@gmail.com>
Branch: py3k
Changeset: r51448:d0b94548df3b
Date: 2012-01-18 14:22 +0100
http://bitbucket.org/pypy/pypy/changeset/d0b94548df3b/

Log:    Check if the destination doesn't contain multiple stars

diff --git a/pypy/interpreter/astcompiler/codegen.py 
b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -837,6 +837,8 @@
             if elt_count > 0:
                 for i, elt in enumerate(tup.elts):
                     if isinstance(elt, ast.Starred):
+                        if star_pos != -1:
+                            self.error("two starred expressions in 
assignment", tup)
                         star_pos = i
             if star_pos > -1:
                 self.emit_op_arg(ops.UNPACK_EX, star_pos | 
(elt_count-star_pos-1)<<8)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to