API reference
python:astx:astx.UnaryOp.__init__
method __init__
__init__(op_code: str, operand: DataType, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/types/operators.py:222
Declared as: python:astx:astx.types.operators.UnaryOp.__init__
Initialize the UnaryOp instance.
Parameters
-
op_code — Operator spelling.; Type: str
-
operand — Operand.; Type: DataType
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None