API reference
python:astx:astx.StructDefStmt.__init__
method __init__
__init__(name: str, attributes: Iterable[VariableDeclaration] | ASTNodes[VariableDeclaration] = [], decorators: Iterable[Expr] | ASTNodes[Expr] = [], methods: Iterable[FunctionDef] | ASTNodes[FunctionDef] = [], visibility: VisibilityKind = VisibilityKind.public, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/classes.py:614
Declared as: python:astx:astx.classes.StructDefStmt.__init__
Initialize StructDefStmt instance.
Parameters
-
name — Type: str
-
attributes — Type: Iterable[VariableDeclaration] | ASTNodes[VariableDeclaration]
-
decorators — Type: Iterable[Expr] | ASTNodes[Expr]
-
methods — Type: Iterable[FunctionDef] | ASTNodes[FunctionDef]
-
visibility — Type: VisibilityKind
-
loc — Type: SourceLocation
-
parent — Type: Optional[ASTNodes]