[Python-Dev] elimination of scope bleeding ofiteration variables

Delaney, Timothy (Tim) tdelaney at avaya.com
Wed May 3 00:29:43 CEST 2006


Josiah Carlson wrote:

>     for line in lines:
>         line = line.rstrip()
>         ...

Exactly the use case I was thinking of (and one I used yesterday BTW).

I'm -1 on *dis*allowing reusing a name bound in a for loop in any
construct i.e. +1 for the status quo.

Tim Delaney


More information about the Python-Dev mailing list