Message194071
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 :) |
|
Date |
User |
Action |
Args |
2013-08-01 13:20:28 | r.david.murray | set | recipients:
+ r.david.murray, docs@python, uglemat |
2013-08-01 13:20:28 | r.david.murray | set | messageid: <1375363228.87.0.646528199026.issue18612@psf.upfronthosting.co.za> |
2013-08-01 13:20:28 | r.david.murray | link | issue18612 messages |
2013-08-01 13:20:28 | r.david.murray | create | |
|