[issue14845] list(<generator expression>) != [<list comprehension>]
R. David Murray
report at bugs.python.org
Fri May 18 04:26:50 CEST 2012
R. David Murray <rdmurray at bitdance.com> added the comment:
I think the behavior is correct. next(x) is outside the for expression in the list comprehension, but 'list(x)' is an implicit 'for x in exp'. So I believe it is the doc that needs amplification. The PEP discussion is referring specifically to the leaking of the loop variable.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list