Zen of Python

Steve Holden steve at holdenweb.com
Fri Jan 21 12:13:40 EST 2005

Skip Montanaro wrote:

>     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
Thanks, Skip. I remember the discussions on python-dev, but I don't 
think that invalidates my point. I wasn't suggesting nobody realized 
there would be name-droppings, simply that nobody realized that a later 
goal of namespace purity would take priority over the initial one of 
for-loop compatibility.

Similar issues surrounded nested scopes, if I remember, and even there 
the jury's still out.

Which is why I "accused" Paul Rubin of requiring psychic powers from 
language developers when he said "So once we can see where it's going, 
why not proceed to the finish line immediately instead of bothering with 
the intermediate steps?"

we-can't-always-see-where-we're-going-ly y'rs  - steve
Steve Holden               http://www.holdenweb.com/
Python Web Programming  http://pydish.holdenweb.com/
Holden Web LLC      +1 703 861 4237  +1 800 494 3119

More information about the Python-list mailing list