[BangPypers] list comprehensions and generator expressions in Python 3
anandology at gmail.com
Thu Feb 21 05:50:56 CET 2013
PEP 289 says "the semantic definition of a list comprehension in
Python 3.0 will be equivalent to list(<generator expression>).
I've just come across a bug reported by Peter Norvig, showing counterexamples.
Very informative to understand the subtle differences between the
semantics of list comprehensions and generator expressions.
More information about the BangPypers