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 "actually, that's a generator 
expression, which are very similar but behave differently". The response was 
that the two concepts are one and the same. I couldn't really say that that's 
incorrect, but I think it's very confusing for beginners if people are talking 
about generator expressions like they are list expressions because they behave 
so differently and the documentation for list comprehensions doesn't mention 
generator expressions. I was kind of longing for a definite answer so I could 
say "Nay, thou shall differentiate between list comprehensions and generator 
expressions". Is it right to correct someone and say that generator expressions 
are in fact *not* generator expressions? Maybe I'm blowing this out of proport
 ions. :)

----------
versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18612>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to