mirror of
https://github.com/python/cpython.git
synced 2025-10-15 19:29:46 +00:00
bpo-31709: Drop support for asynchronous __aiter__. (#3903)
This commit is contained in:
parent
86566702f3
commit
faa135acbf
9 changed files with 47 additions and 300 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue