Steve> The fact that a bright bunch like the Python developers didn't Steve> realize that it would be sensible to have a local scope for the Steve> list comprehension variable is a perfect demonstration of that Steve> point.
Actually, I seem to recall that the topic came up, but at the time the goal was that list comprehensions be semantically the same as for loops, so the fact that the loop variable survived to pollute the namespace was deemed okay. Skip -- http://mail.python.org/mailman/listinfo/python-list