Fix Parsing.py so it compiles with Cython
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 16 Oct 2009 11:20:15 +0000 (13:20 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 16 Oct 2009 11:20:15 +0000 (13:20 +0200)
Cython/Compiler/Parsing.py

index c567bdcda613dbf43ae1b3ebc587280631e8d2cf..2f28af049f258813aae723c2147e09c66ad1cf3f 100644 (file)
@@ -924,7 +924,7 @@ def flatten_parallel_assignments(input, output):
     #  individual elements.  This transformation is applied
     #  recursively, so that nested structures get matched as well.
     rhs = input[-1]
-    if not rhs.is_sequence_constructor or not sum(lhs.is_sequence_constructor for lhs in input[:-1]):
+    if not rhs.is_sequence_constructor or not sum([lhs.is_sequence_constructor for lhs in input[:-1]]):
         output.append(input)
         return