This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients pitrou, qwjqwj
Date 2009-03-27.15:53:33
SpamBayes Score 1.7975181e-07
Marked as misclassified No
Message-id <1238169214.9.0.822488295005.issue5577@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2009-03-27 15:53:35pitrousetrecipients: + pitrou, qwjqwj
2009-03-27 15:53:34pitrousetmessageid: <1238169214.9.0.822488295005.issue5577@psf.upfronthosting.co.za>
2009-03-27 15:53:33pitroulinkissue5577 messages
2009-03-27 15:53:33pitroucreate