From: Stefan Behnel Date: Fri, 23 Oct 2009 13:53:24 +0000 (+0200) Subject: fix cascade order of assignments for complete assignments within parallel assignments X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a7e5883e07b32bee1365979bac077c96039e449a;p=cython.git fix cascade order of assignments for complete assignments within parallel assignments --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index c163d35b..95769e84 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -928,7 +928,7 @@ def flatten_parallel_assignments(input, output): output.append(input) return - complete_assignments = [rhs] + complete_assignments = [] rhs_size = len(rhs.args) lhs_targets = [ [] for _ in range(rhs_size) ] @@ -968,8 +968,9 @@ def flatten_parallel_assignments(input, output): for targets, expr in zip(lhs_targets, lhs.args): targets.append(expr) - if len(complete_assignments) > 1: - output.append(complete_assignments[::-1]) + if complete_assignments: + complete_assignments.append(rhs) + output.append(complete_assignments) # recursively flatten partial assignments for cascade, rhs in zip(lhs_targets, rhs.args):