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