Author: Raffael Tfirst <[email protected]>
Branch: py3.5
Changeset: r85504:a8f99affbbfd
Date: 2016-07-01 20:42 +0200
http://bitbucket.org/pypy/pypy/changeset/a8f99affbbfd/
Log: Only allow dicts in map_unpack_with_call
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1358,6 +1358,9 @@
w_dict = self.space.newdict()
for i in range(num_maps, 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