News for hackers. Stuff that matters.
Re:WTF Python: Exploring and understanding Python through su... by edflsafoiewq on Thursday February 11, 2021 @06:03AM (#26100254)
That's how I expect it to behave. But anyway, the alternative (x in a new lexical environment each time the loop body is entered) only makes sense in a language where variables are scoped to a lexical block, not in Python where variables are scoped to the whole function.

There are no comments on this comment yet.