[Python-Dev] elimination of scope bleeding ofiteration variables

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 2 13:13:56 CEST 2006


Josiah Carlson wrote:

>     for line in lines:
>         line = line.rstrip()
>         ...
> 
> I'm generally -0 on the "raise a SyntaxError" in this particular case,

That's a good point. I'm inclined to agree.
I think I might have even done something like
that recently, but I can't remember the
details.

> and am +0 on the double use below:
> 
>     for x in y:
>         for x in z:

Can anyone think of a plausible use case for that?

--
Greg


More information about the Python-Dev mailing list