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 the await 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>
get_children()[source]#

Get the child nodes below this node.

postinit(value: NodeNG) None[source]#
value: NodeNG#

What to wait for.