[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other

2014-06-19 Thread uglemat
uglemat added the comment: Yeah, I guess it's pretty obvious that generator expressions are not list comprehensions from the glossary. I'll close the bug. -- status: open -> closed ___ Python tracker _

[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other

2014-06-19 Thread Mark Lawrence
Mark Lawrence added the comment: Both list comprehension and generator expression are defined in the glossary https://docs.python.org/3/glossary.html, so what else can be done? -- nosy: +BreamoreBoy ___ Python tracker

[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other

2013-08-01 Thread R. David Murray
R. David Murray added the comment: 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 productio

[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other

2013-08-01 Thread uglemat
uglemat added the comment: > Is it right to correct someone and say that generator expressions are in fact > *not* generator expressions? Ups, I meant "Is it right to correct someone and say that generator expressions are in fact *not* list comprehensions?" All these expressions and comprehen

[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other

2013-08-01 Thread uglemat
uglemat added the comment: Yeah I think the differences are pretty easy to comprehend. To be honest the reason I came here is that I had an argument where someone commented on my code (where I used a generator expression) saying something akin to "list comprehensions are nice", so I replied "a

[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other

2013-08-01 Thread R. David Murray
R. David Murray added the comment: Well, you haven't done anything wrong, but I'm not sure what we can do in response to the report. What how will the answer to the question serve you? What will you know after getting the answer that you didn't know before getting the answer? I'm trying her

[issue18612] More elaborate documentation on how list comprehensions and generator expressions relate to each other

2013-08-01 Thread uglemat
New submission from uglemat: Today there are list comprehensions, set comprehensions, dict comprehensions and then... there are generator expressions, which apparently was called 'generator comprehensions' in the original PEP, don't know why that was changed. Some questions arises: * Are gen