clean up comprehensions to bring them closer to generator expressions, make their...
authorStefan Behnel <scoder@users.berlios.de>
Thu, 27 May 2010 13:34:15 +0000 (15:34 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 27 May 2010 13:34:15 +0000 (15:34 +0200)
commitee2d417845f79961ff22351191d1365b7d0a5b67
tree1ae7165d4956875875aae416316066961e872de6
parentac7b0df6c61eee24088a3bee62cf6908d1ce8d08
clean up comprehensions to bring them closer to generator expressions, make their scoping behaviour configurable
remove optimisations for set([...]) and dict([...]) as they do not take side-effects into account: unhashable items lead to pre-mature exit from the loop
instead, transform set(genexp), list(genexp) and dict(genexp) into inlined comprehensions that do not leak loop variables
Cython/Compiler/ExprNodes.py
Cython/Compiler/Optimize.py
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/Parsing.py
Cython/Compiler/Visitor.py
tests/run/dictcomp.pyx
tests/run/listcomp.pyx
tests/run/setcomp.pyx