API reference

python:astx:astx.classes_ext.ClassDefStmt

class ClassDefStmt

ClassDefStmt(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)

Source: packages/astx/src/astx/classes_ext.py:97

Explicit class definition statement.

Represent one top-level class declaration with explicit base-class references and inherited struct-like member containers.

Attributes

Methods

Attributes

Search documentation

Type to search.