We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b089725 commit 700b619Copy full SHA for 700b619
Python/bytecodes.c
@@ -5042,11 +5042,7 @@ dummy_func(
5042
}
5043
} else if (oparg == 1) {
5044
// Async case, similar to GET_AITER
5045
- unaryfunc getter = NULL;
5046
- if (type->tp_as_async != NULL) {
5047
- getter = type->tp_as_async->am_aiter;
5048
- }
5049
- if (getter == NULL) {
+ if (type->tp_as_async == NULL || type->tp_as_async->am_aiter == NULL) {
5050
PyErr_Format(PyExc_TypeError,
5051
"'async for' requires an object with "
5052
"__aiter__ method, got %.100s",
0 commit comments