[issue28419] List comprehension in class scope does not have access to class scope

2016-10-11 Thread David Eyk
David Eyk added the comment: Thanks for the pointer. That seems weird and arbitrary when you think of it in terms of scope, but what can you do? All the same, thanks for the quick response. :) -- ___ Python tracker

[issue28419] List comprehension in class scope does not have access to class scope

2016-10-11 Thread R. David Murray
R. David Murray added the comment: See issue 11796, and the issue it is marked as a duplicate of, for an explanation. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Comprehensions in a class definition mostly cannot access c

[issue28419] List comprehension in class scope does not have access to class scope

2016-10-11 Thread David Eyk
New submission from David Eyk: I've discovered what appears to be a scoping bug in Python 3.5.1, where the class scope is not available inside a list comprehension defined in the class scope. Attached is a simple example script, also available at the following gist: https://gist.github.com/ey