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 terry.reedy
Recipients gvanrossum, pitrou, qwjqwj, terry.reedy
Date 2009-03-27.23:29:08
SpamBayes Score 2.5424107e-14
Marked as misclassified No
Message-id <1238196551.56.0.182811730133.issue5577@psf.upfronthosting.co.za>
In-reply-to
Content
I think this should just be closed.

The original implied claim that 3.0 is not correct is not correct.  The
change of behavior is a clear side effect of and intended and documented
change in the semantics of comprehensions.

As near as I can tell, the results of the experiments are all correct
according to the doc for yield.

Python-list or the python-ideas list is more appropriate than the
tracker to discuss a semantic change.  In any case, comprehensions are
function expressions, like lambda expressions, and expressions therein
should act much the same as the expression in a lambda expression.

Even if unclear, slightly insane, and not very useful, I do not think
yield should be prohibited in generators expression because
1) it would introduce a back-incompatibility in 3.1;
2) it would slightly break the parallelism with other comprehensions;
3) it would slightly break the parallelism with the expanded for-form;
4) such use is unlikely in real practice; and
5) it would raise the question of where else to prohibit yield.
History
Date User Action Args
2009-03-27 23:29:11terry.reedysetrecipients: + terry.reedy, gvanrossum, pitrou, qwjqwj
2009-03-27 23:29:11terry.reedysetmessageid: <1238196551.56.0.182811730133.issue5577@psf.upfronthosting.co.za>
2009-03-27 23:29:10terry.reedylinkissue5577 messages
2009-03-27 23:29:09terry.reedycreate