You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that in python 2 (which is the main target of this mode) list/set/dict comprehensions leak the index variable(s) to the enclosing scope, but generator expressions do not. In python 3, none of them leak the index variable(s).
The text was updated successfully, but these errors were encountered:
In general, modes work front-to-back, so indeed, at the use of x, it won't have seen the declaration of x yet. I've added a kludge in attached patch to handle this specific case (the expression of a comprehension being a single variable), but I handling it generally for comprehensions where the initial expression is more complex isn't realistic with this approach. Is that acceptable?
Note that in python 2 (which is the main target of this mode) list/set/dict comprehensions leak the index variable(s) to the enclosing scope, but generator expressions do not. In python 3, none of them leak the index variable(s).
The text was updated successfully, but these errors were encountered: