API reference
python:astx:astx.classes_ext.ClassConstruct
class ClassConstruct
ClassConstruct(class_name: str, args: tuple[astx.DataType, ...] = (), *, keywords: tuple[astx.KeywordArgument, ...] = (), loc: astx.SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/classes_ext.py:220
Class construction with ordered positional and keyword expressions.
Attributes
-
class_name — Name of class.; Type: str
-
type_ — Type associated with this expression.; Type: AnyType
-
args — Declared or supplied call arguments.; Type: tuple[astx.DataType, ...]
-
keywords — Keywords.; Type: tuple[astx.KeywordArgument, ...]
-
loc — Type: SourceLocation
-
kind — Type: ASTKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
-
name — Type: str
-
_tmp_id — Type: int
Methods
-
__init__ — Initialize one default class construction expression.
-
__str__ — Render one class construction expression as text.
-
get_struct — Build one repr structure for class construction.