[Python-Dev] elimination of scope bleeding ofiteration variables
Aahz
aahz at pythoncraft.com
Tue May 2 16:02:37 CEST 2006
On Tue, May 02, 2006, Nick Coghlan wrote:
> Greg Ewing wrote:
>> Josiah Carlson wrote:
>>>
>>> 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?
>
> This really seems more like the domain of pychecker/pylint rather than
> the compiler. The code may be a bad idea, but I don't see any reason
> to make it a syntax error.
My sentiments precisely. Unless someone can come up with a good reason
for changing the current semantics, I'm -1.
Side note: if people do want to continue discussing this, I think it
should go to python-3000. There is absolutely no reason to break
currently-running code that happens to use this pattern.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"Argue for your limitations, and sure enough they're yours." --Richard Bach
More information about the Python-Dev
mailing list