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 r.david.murray
Recipients docs@python, r.david.murray, uglemat
Date 2013-08-01.13:20:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375363228.87.0.646528199026.issue18612@psf.upfronthosting.co.za>
In-reply-to
Content
Well, it is the case that if you substitute a list comprehension for a generator expression in arbitrary code, most of the time it would work but occasionally it wouldn't, because the runtime behavior is different (lazy production versus all-at-once production).  So yes, the two are not the same thing, and it is important to understand the differences in behavior between them.  Calling a generator expression a list comprehension indicates someone's mental model of how Python works has a couple holes in it, IMO :)
History
Date User Action Args
2013-08-01 13:20:28r.david.murraysetrecipients: + r.david.murray, docs@python, uglemat
2013-08-01 13:20:28r.david.murraysetmessageid: <1375363228.87.0.646528199026.issue18612@psf.upfronthosting.co.za>
2013-08-01 13:20:28r.david.murraylinkissue18612 messages
2013-08-01 13:20:28r.david.murraycreate