API reference
python:astx:astx.ParenthesizedExpr
class ParenthesizedExpr
ParenthesizedExpr(value: Expr, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/base.py:758
Declared as: python:astx:astx.base.ParenthesizedExpr
AST class for explicitly grouped expressions (parentheses retained).
Attributes
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
-
name — Type: str
-
_tmp_id — Type: ClassVar[int]
-
type_ — Type: DataType
-
kind — Type: ASTKind
-
value — Type: Expr
Methods
-
__init__ — Initialize the ParenthesizedExpr instance.
-
__str__ — Return a string representation of the object with parentheses.
-
get_struct — Return the AST structure of the object.