API reference
python:astx:astx.classes_ext.ClassDefStmt.__init__
method __init__
__init__(name: str, *, bases: Iterable[ClassType] | astx.ASTNodes[ClassType] = (), attributes: Iterable[astx.VariableDeclaration] | astx.ASTNodes[astx.VariableDeclaration] = (), decorators: Iterable[astx.Expr] | astx.ASTNodes[astx.Expr] = (), methods: Iterable[astx.FunctionDef] | astx.ASTNodes[astx.FunctionDef] = (), visibility: VisibilityKind = VisibilityKind.public, is_abstract: bool = False, loc: astx.SourceLocation = NO_SOURCE_LOCATION, parent: astx.ASTNodes[astx.AST] | None = None) -> None
Source: packages/astx/src/astx/classes_ext.py:117
Initialize one class definition statement.
Parameters
-
name — Type: str
-
bases — Type: Iterable[ClassType] | astx.ASTNodes[ClassType]
-
attributes — Type: Iterable[astx.VariableDeclaration] | astx.ASTNodes[astx.VariableDeclaration]
-
decorators — Type: Iterable[astx.Expr] | astx.ASTNodes[astx.Expr]
-
methods — Type: Iterable[astx.FunctionDef] | astx.ASTNodes[astx.FunctionDef]
-
visibility — Type: VisibilityKind
-
is_abstract — Type: bool
-
loc — Type: astx.SourceLocation
-
parent — Type: astx.ASTNodes[astx.AST] | None