[pypy-commit] pypy py3.5: 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)
raffael_t
pypy.commits at gmail.com
Tue Aug 23 09:14:40 EDT 2016
Author: Raffael Tfirst <raffael.tfirst at gmail.com>
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
More information about the pypy-commit
mailing list