Await¶
- class astroid.nodes.Await(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
NodeNGClass representing an
ast.Awaitnode.An
Awaitis theawaitkeyword.>>> import astroid >>> node = astroid.extract_node(''' ... async def func(things): ... await other_func() ... ''') >>> node <AsyncFunctionDef.func l.2 at 0x...> >>> node.body[0] <Expr l.3 at 0x...> >>> list(node.body[0].get_children())[0] <Await l.3 at 0x...>