pystencils.backend.ast.expressions.PsCast#
- class pystencils.backend.ast.expressions.PsCast(target_type, operand)#
C-style type cast.
Convert values to another type according to C casting rules. The target type may be
None
, in which case it will be inferred by theTypifier
according to the surrounding type context.- Parameters:
target_type (
PsType
|None
) – Target type of the cast, orNone
if the target type should be inferred from the surrounding contextoperand (
PsExpression
) – Expression whose value will be cast