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:42
Declared as: python:astx:astx.types.casting.TypeCastExpr.__init__
Initialize the type-cast expression.
Parameters
-
expr — Type: Expr
-
target_type — Type: DataType
-
loc — Type: SourceLocation
-
parent — Type: Optional[ASTNodes]