MCPcopy Create free account
hub / github.com/apache/fory / _decimal_from_text

Function _decimal_from_text

python/pyfory/converter.py:76–79  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

74
75
76def _decimal_from_text(value: str) -> decimal.Decimal:
77 if not _numeric_literal_fits(value):
78 raise ValueError("invalid numeric literal")
79 return _canonical_decimal(decimal.Decimal(value))
80
81
82def _numeric_literal_fits(value: str) -> bool:

Callers 1

_numeric_valueFunction · 0.85

Calls 3

_numeric_literal_fitsFunction · 0.85
_canonical_decimalFunction · 0.85
DecimalMethod · 0.45

Tested by

no test coverage detected