Author: Raffael Tfirst <raffael.tfi...@gmail.com>
Branch: py3.5
Changeset: r85201:d3a8be3eee83
Date: 2016-06-16 22:42 +0200
http://bitbucket.org/pypy/pypy/changeset/d3a8be3eee83/

Log:    Fix visit_tuple

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
@@ -1072,7 +1072,12 @@
 
     def visit_Tuple(self, tup):
         self.update_position(tup.lineno)
-        self._visit_list_or_tuple(tup, tup.elts, tup.ctx, ops.BUILD_TUPLE)
+        if l.ctx == ast.Store:
+            self._visit_list_or_tuple_assignment(l, l.elts)
+        elif l.ctx == ast.Load:
+            self._visit_list_or_tuple_starunpack(tup, tup.elts, tup.ctx, 
ops.BUILD_TUPLE)
+        else
+            self.visit_sequence(l.elts)
 
     def visit_List(self, l):
         self.update_position(l.lineno)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to