News for hackers. Stuff that matters.
Re:Comprehensions in Python the Jedi way by chishaku on Sunday March 27, 2016 @11:43AM (#11370325)
> One interesting side-thing with list comprehensions

Just to clarify, this is the behavior of py2 for loops in general, whether in a comprehension or not.

Re:Comprehensions in Python the Jedi way by prlin on Sunday March 27, 2016 @11:48AM (#11370343)
Except dictionary comprehensions don't leak their variables.
Re:Comprehensions in Python the Jedi way by sophacles on Sunday March 27, 2016 @02:39PM (#11370954)
Probably because dict comprehensions were introduced as a 3.0 feature, and put into 2.7 since that version is designed to be a bridge to 3.0.

(They were actually proposed a long time ago, it was decided not to add them, but the decision changed to add them for 3.0)