• Stefan Behnel's avatar
    clean up comprehensions to bring them closer to generator expressions, make... · ee2d4178
    Stefan Behnel authored
    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
    ee2d4178
dictcomp.pyx 1.34 KB