API reference
python:astx:astx.literals.LiteralComplex
class LiteralComplex
LiteralComplex(real: float, imag: float, loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/literals/numeric.py:507
Declared as: python:astx:astx.literals.numeric.LiteralComplex
Base class for literal complex numbers.
Attributes
-
type_ — Type: Complex
-
value — Type: tuple[float, float]
Methods
-
__init__ — Initialize a generic complex number.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST representation for the complex literal.