API reference
python:astx:astx.TypeCastExpr.__init__
method __init__
__init__(expr: Expr, target_type: DataType, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/types/casting.py:39
Declared as: python:astx:astx.types.casting.TypeCastExpr.__init__
Initialize the type-cast expression.
Parameters
-
expr — Expression to process.; Type: Expr
-
target_type — Destination type for the conversion.; Type: DataType
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None