[issue11796] list and generator expressions in a class definition fail if expression condition refers to a class variable

2011-04-07 Thread Menno Smits
New submission from Menno Smits : A list comprehension or generator expression in a class definition fails with NameError if it has a condition that refers to another class variable. This doesn't occur if the class variable is used the "in" part of the expression. The followin

[issue11796] Comprehensions in a class definition mostly cannot access class variable

2011-04-09 Thread Menno Smits
Menno Smits added the comment: Thanks to everyone for the explanations. I was hoping for behaviour along the lines of Python 2 (certainly not artificially blocking more cases in the name of consistency) but it doesn't look like that's going to happen. I think this is one slight and