class astroid.nodes.AsyncFunctionDef(name: str, lineno: int, col_offset: int, parent: NodeNG, *, end_lineno: int | None, end_col_offset: int | None)[source]

Bases: FunctionDef

Class representing an ast.FunctionDef node.

A AsyncFunctionDef is an asynchronous function created with the async keyword.

>>> import astroid
>>> node = astroid.extract_node('''
async def func(things):
    async for thing in things:
>>> node
<AsyncFunctionDef.func l.2 at 0x7f23b2e416d8>
>>> node.body[0]
<AsyncFor l.3 at 0x7f23b2e417b8>