Georg Brandl added the comment:
The actual equivalent would be
class A:
a = 'test'
def __g(_x):
for c in _x:
if c in a:
yield c
tuple(__g(a))
i.e. the outmost iterator is evaluated in the enclosing scope; not the
if clause is in its own scope, but the whole genexp.
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2217>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com