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 gvanrossum
Recipients Inyeol.Lee, benjamin.peterson, georg.brandl, gvanrossum, rhettinger
Date 2010-11-29.03:13:53
SpamBayes Score 5.4619755e-07
Marked as misclassified No
Message-id <1291000436.7.0.985183682766.issue10544@psf.upfronthosting.co.za>
In-reply-to
Content
I think it is definitely wrong the way it works in 3.x.  (Especially since it works as expected in 2.x.)

I agree with Inyeol's preference of fixes: (1) make it work properly for listcomps as well as genexps, (2) if that's not possible, forbid yield in a genexp or listcomp.

Note that even though yield in a genexp could be considered as having a well-defined meaning, that meaning is not useful and I would consider it as merely a coincidence of the specification, not an intentional effect.  So I would be fine changing its meaning.  (My assumption is that since it is not useful there is -- almost -- no code depending on that meaning.)
History
Date User Action Args
2010-11-29 03:13:56gvanrossumsetrecipients: + gvanrossum, georg.brandl, rhettinger, benjamin.peterson, Inyeol.Lee
2010-11-29 03:13:56gvanrossumsetmessageid: <1291000436.7.0.985183682766.issue10544@psf.upfronthosting.co.za>
2010-11-29 03:13:53gvanrossumlinkissue10544 messages
2010-11-29 03:13:53gvanrossumcreate