Author: Raffael Tfirst <raffael.tfi...@gmail.com>
Branch: py3.5
Changeset: r86173:f658ed1189a5
Date: 2016-08-12 17:57 +0200
http://bitbucket.org/pypy/pypy/changeset/f658ed1189a5/

Log:    Fix BUILD_SET_UNPACK by changing iterator to iter instead of
        itervalues as w_item should never be a dict anyway

diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1375,10 +1375,11 @@
         for i in range(itemcount, 0, -1):
             w_item = self.peekvalue(i-1)
             # cannot use w_sum.update, w_item might not be a set
-            iterator = w_item.itervalues()
+            iterator = space.iter(w_item)
             while True:
-                w_value = iterator.next_value()
-                if w_value is None:
+                try:
+                    w_value = space.next(iterator)
+                except OperationError:
                     break
                 w_sum.add(w_value)
         while itemcount != 0:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to