James Stroud <[EMAIL PROTECTED]> writes: > Probably, with good code, block scope would be overkill, except that I > would welcome list comprehensions to have a new scope:
Block scope is a win because it gets rid of the uncertainty of whether the variable is used outside the block or not. The "good code" theory (just manually don't use the variable elsewhere) doesn't always hold up under release deadline pressure and so on and doesn't make sense anyway. What's the point of NOT having block scope if you don't want to allow for creating variables in inner blocks and using them in other blocks? I think it's best to require creating the variable in a mutually enclosing scope if you want to use it that way. -- http://mail.python.org/mailman/listinfo/python-list