Skip to content

StatementList

A Python statement list, which is a list of statements that can be rendered in a Python source file.

import { StatementList } from "@alloy-js/python";
<StatementList >
{children}
</StatementList>
childrenChildren
<StatementList>
<FunctionDeclaration name="test" />
<VariableDeclaration name="x" value={42} />
</StatementList>

renders to

def test():
pass
x = 42