PyDocs

Nav

Numeric and Mathematical Modules

Decimal.to_integral

decimal

method of Decimal
  • Decimal.to_integral(rounding=None, context=None)
Identical to the to_integral_value() method.

The to_integral() name has been kept for compatibility with older
versions.
1 Example
>>> def remove_exponent(d):
...     return d.quantize(Decimal(1)) if d == d.to_integral() else d.normalize()
from the Python docs
See Also
No see-alsos for decimal/Decimal.to_integral
0 Notes
No notes for Decimal.to_integral