Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(276049)

Unified Diff: Python/compile.c

Issue 11682: PEP 380 reference implementation for 3.3
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Objects/exceptions.c ('K') | « Python/ceval.c ('k') | Python/graminit.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Python/compile.c Thu Jan 12 08:06:49 2012 +0100
+++ b/Python/compile.c Fri Jan 13 00:26:31 2012 +1000
@@ -840,6 +840,7 @@
case IMPORT_STAR:
return -1;
case YIELD_VALUE:
+ case YIELD_FROM:
return 0;
case POP_BLOCK:
@@ -3318,7 +3319,12 @@
else {
ADDOP_O(c, LOAD_CONST, Py_None, consts);
}
- ADDOP(c, YIELD_VALUE);
+ if (e->v.Yield.is_from) {
+ ADDOP(c, YIELD_FROM);
+ }
+ else {
+ ADDOP(c, YIELD_VALUE);
+ }
break;
case Compare_kind:
return compiler_compare(c, e);
« Objects/exceptions.c ('K') | « Python/ceval.c ('k') | Python/graminit.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+