Daniel Diniz <[EMAIL PROTECTED]> added the comment: I believe the problem is that list comprehensions in 3.0 have scope like that of genexprs in 2.5, but the change was deliberate (as it also avoids leaking of temp variables).
Compare to 2.5: >>> class Foo(object): ... class_attribute1 = 1 ... class_attribute2 = (class_attribute1 for x in range(8)) ... >>> Foo.class_attribute2.next() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 3, in <genexpr> NameError: global name 'class_attribute1' is not defined ---------- nosy: +ajaksu2 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3692> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com