On this page
  1. ast.Await
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

ast.Await

Prev: ast.AugStore | Up: ast | Next: ast.BinOp
Rel: ast.Add, ast.alias, ast.And, ast.AnnAssign
Ref: docs.python.org — ast.Await
Tags: #public #python3 #stdlib #ast


Import

import ast
from ast import Await

Signature & Overview

ast.Await(expr value)

Await(expr value)

Usage

import ast

fn = ast.parse("async def f(x): return await x").body[0]
assert isinstance(fn.body[0].value, ast.Await)

Gotchas

REPL Inspect

from ast import Await
help(Await)

Linked from

Related notes