>> We can hardly be sure of what iterator comprehensions would be >> defined to do, given they don't exist, but surely we can HOPE that in >> an ideal world where iterator comprehensions were part of Python they >> would not be similarly leaky:-).
Guido> It's highly likely that the implementation will have to create a Guido> generator function under the hood, so they will be safely Guido> contained in that frame.
Which suggests they aren't likely to be a major performance win over list comprehensions. If nothing else, they would push the crossover point between list comprehensions and iterator comprehensions toward much longer lists.
Is performance is the main reason this addition is being considered? They don't seem any more expressive than list comprehensions to me.