On Mon, Jun 25, 2018 at 2:16 PM Steve Holden <steve@holdenweb.com> wrote:
​I'd like to ask: how many readers of ​
 
​this email have ever deliberately taken advantage of the limited Python 3 scope in comprehensions and generator expressions to use what would otherwise be a conflicting local variable name?​

​No, never, but the opposite has bitten me in production code (as I related several months back, a class-level variable was being used on the lhs of a comprehension and that failed when it was run in Py3).

The caveat is that our code base is Py2+Py3, so we have the mindset that comprehension variables always leak.​