[Python-3000] Change to class construction? (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jul 7 03:17:39 CEST 2007


Phillip J. Eby wrote:

This looks like a bug to me. A list comprehension's local scope should be the locals of the enclosing code, even if its loop indexes aren't exposed to that scope.

It sounds like list comprehensions are being implemented using genexps behind the scenes now.

Is this wise? In a recent thread, I suggested that one of the reasons for keeping the LC syntax was that it could be faster than list(genexp). Has anyone investigated whether any speed is being lost by making them equivalent?

-- Greg



More information about the Python-3000 mailing list