Author: Raffael Tfirst <[email protected]>
Branch: py3.5
Changeset: r85514:07a2694317a1
Date: 2016-07-02 11:23 +0200
http://bitbucket.org/pypy/pypy/changeset/07a2694317a1/

Log:    Type check also in map_unpack

diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1377,6 +1377,9 @@
         w_dict = self.space.newdict()
         for i in range(itemcount, 0, -1):
             w_item = self.peekvalue(i-1)
+            if not issubclass(w_item.__class__, 
self.space.newdict().__class__):
+                raise oefmt(self.space.w_TypeError,
+                        "%s is not a mapping", w_item.__class__.__name__)
             num_items = w_item.length()
             for j in range(num_items):
                 (w_key, w_value) = w_item.popitem()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to