> > Anyway, this is no different from the > > problem of: > > > > for x in R: > > ... > > print x > > Well, yes. I still think it's dubious code. > > > In any case, are there plans to also have the compiler emit > > warnings about potential reliance on this feature? > > I would hope that we wouldn't make changes without emitting such a > warning. I'm not sure how hard it would be to implement, tho'. Warning about what? I have no intent to make the example quoted above illegal; a regular for loop control variable's scope will extend beyond the loop. It's only list comprehensions where I plan to remove x from the scope after the comprehension is finished. Do you need a warning for that change too? Code that relies on it is pretty sick IMO. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4