Author: Raffael Tfirst <[email protected]>
Branch: py3.5
Changeset: r86445:c505dc6d5e8d
Date: 2016-08-23 15:13 +0200
http://bitbucket.org/pypy/pypy/changeset/c505dc6d5e8d/
Log: Fix unpack_map bug saying X is not a mapping if another element is
unpacked before (reset is_unpacking to False if element doesn't have
to be unpacked)
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
@@ -1236,6 +1236,8 @@
key = d.keys[i]
if key is None:
is_unpacking = True
+ else:
+ is_unpacking = False
if elements == 0xFFFF or (elements and is_unpacking):
self.emit_op_arg(ops.BUILD_MAP, elements)
containers += 1
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit