Antoine Pitrou <pit...@free.fr> added the comment: It's true, however, that there is a difference in behaviour between 2.x and 3.x here. In 2.x, the function containing the list comprehension is a generator. In 3.x, it's the list comprehension itself which becomes a generator. I'm not sure which one is more useful. Also, it's likely that this won't be changed, because it's due to the compilation model of list comprehensions (which are compiled as a separate code object in 3.x).
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5577> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com