AsyncFor¶
- class astroid.nodes.AsyncFor(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
ForClass representing an
ast.AsyncFornode.An
AsyncForis an asynchronousForbuilt with theasynckeyword.>>> import astroid >>> node = astroid.extract_node(''' ... async def func(things): ... async for thing in things: ... print(thing) ... ''') >>> node <AsyncFunctionDef.func l.2 at 0x...> >>> node.body[0] <AsyncFor l.3 at 0x...>