Skip to content

Commit

Permalink
Update Python/bytecodes.c
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Bierma <[email protected]>
  • Loading branch information
efimov-mikhail and ZeroIntensity authored Nov 7, 2024
1 parent b089725 commit 700b619
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -5042,11 +5042,7 @@ dummy_func(
}
} else if (oparg == 1) {
// Async case, similar to GET_AITER
unaryfunc getter = NULL;
if (type->tp_as_async != NULL) {
getter = type->tp_as_async->am_aiter;
}
if (getter == NULL) {
if (type->tp_as_async == NULL || type->tp_as_async->am_aiter == NULL) {
PyErr_Format(PyExc_TypeError,
"'async for' requires an object with "
"__aiter__ method, got %.100s",
Expand Down

0 comments on commit 700b619

Please sign in to comment.