API reference
python:astx:astx.literals.Literal
class Literal
Literal(*args, **kwargs)
Source: packages/astx/src/astx/literals/base.py:23
Declared as: python:astx:astx.literals.base.Literal
Literal Data type.
Attributes
-
ref — Type: str
-
type_ — Type: ExprType
-
loc — Type: SourceLocation
-
value — Type: Any
Methods
-
__init__ — Initialize the literal base node.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST representation for the object.