for loop without variable

Paul Rubin http
Fri Jan 11 09:00:13 EST 2008


Fredrik Lundh <fredrik at pythonware.com> writes:
> (and if you use sane naming conventions, the risk for collisions is
> near zero as well).

I haven't felt that way, I'm always worried about clobbering something
by leaking a variable.  Maybe collisions don't really happen much, but
it's always seemed cleaner to me to use the most restricted scopes
possible just to minimize or eliminate the possibility.  This is
especially attractie in a language like Python, with no declarations
and no compile-time type safety.



More information about the Python-list mailing list