Zen of Python

Skip Montanaro skip at pobox.com
Fri Jan 21 11:04:33 EST 2005


    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




More information about the Python-list mailing list