Commit 8332ebce authored by Stefan Behnel's avatar Stefan Behnel

disable optimised sequence unpacking for bytes/str - hard to get right for Py2/Py3

parent 18cf9d56
...@@ -432,9 +432,7 @@ def flatten_parallel_assignments(input, output): ...@@ -432,9 +432,7 @@ def flatten_parallel_assignments(input, output):
# individual elements. This transformation is applied # individual elements. This transformation is applied
# recursively, so that nested structures get matched as well. # recursively, so that nested structures get matched as well.
rhs = input[-1] rhs = input[-1]
if (not (rhs.is_sequence_constructor or if (not (rhs.is_sequence_constructor or isinstance(rhs, ExprNodes.UnicodeNode))
(rhs.is_string_literal and not (rhs.type.is_string or
rhs.type is Builtin.bytes_type)))
or not sum([lhs.is_sequence_constructor for lhs in input[:-1]])): or not sum([lhs.is_sequence_constructor for lhs in input[:-1]])):
output.append(input) output.append(input)
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment