bpo-31709: Drop support for asynchronous __aiter__. (#3903)

This commit is contained in:
Yury Selivanov 2017-10-06 02:08:57 -04:00 committed by GitHub
parent 86566702f3
commit faa135acbf
9 changed files with 47 additions and 300 deletions

View file

@ -2298,8 +2298,6 @@ compiler_async_for(struct compiler *c, stmt_ty s)
VISIT(c, expr, s->v.AsyncFor.iter);
ADDOP(c, GET_AITER);
ADDOP_O(c, LOAD_CONST, Py_None, consts);
ADDOP(c, YIELD_FROM);
compiler_use_next_block(c, try);
@ -3867,8 +3865,6 @@ compiler_async_comprehension_generator(struct compiler *c,
/* Sub-iter - calculate on the fly */
VISIT(c, expr, gen->iter);
ADDOP(c, GET_AITER);
ADDOP_O(c, LOAD_CONST, Py_None, consts);
ADDOP(c, YIELD_FROM);
}
compiler_use_next_block(c, try);
@ -4033,8 +4029,6 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type,
if (outermost->is_async) {
ADDOP(c, GET_AITER);
ADDOP_O(c, LOAD_CONST, Py_None, consts);
ADDOP(c, YIELD_FROM);
} else {
ADDOP(c, GET_ITER);
}