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:
NodeNG
Class representing an
ast.Await
node.An
Await
is theawait
keyword.>>> import astroid >>> node = astroid.extract_node(''' async def func(things): await other_func() ''') >>> node <AsyncFunctionDef.func l.2 at 0x7f23b2e41748> >>> node.body[0] <Expr l.3 at 0x7f23b2e419e8> >>> list(node.body[0].get_children())[0] <Await l.3 at 0x7f23b2e41a20>