API reference
python:astx:astx.LiteralFloat.__init__
method __init__
__init__(value: str | Decimal, loc: SourceLocation = NO_SOURCE_LOCATION) -> None
Source: packages/astx/src/astx/literals/numeric.py:603
Declared as: python:astx:astx.literals.numeric.LiteralFloat.__init__
Preserve an exact finite decimal value without binary rounding.
Parameters
-
value — Value to process.; Type: str | Decimal
-
loc — Source coordinates associated with the node.; Type: SourceLocation
Raises
- ValueError: "If the value is malformed or nonfinite."
Returns
Type: None