This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Peter.Norvig, ezio.melotti, r.david.murray
Date 2012-05-18.02:26:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337308010.37.0.820423650659.issue14845@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-05-18 02:26:50r.david.murraysetrecipients: + r.david.murray, ezio.melotti, Peter.Norvig
2012-05-18 02:26:50r.david.murraysetmessageid: <1337308010.37.0.820423650659.issue14845@psf.upfronthosting.co.za>
2012-05-18 02:26:49r.david.murraylinkissue14845 messages
2012-05-18 02:26:49r.david.murraycreate