Python Decimal Module
Decimal fixed-point arithmetic — Decimal, getcontext, quantize. This category documents 4 Python decimal module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: decimal.Decimal(), decimal.getcontext(), decimal.localcontext(), decimal.Decimal.quantize(). decimal.Decimal() creates a Decimal number from a string, integer, or float. Provides exact decimal arithmetic. decimal.getcontext() returns the current thread-local Decimal context (precision, rounding, traps). decimal.localcontext() returns a context manager that temporarily changes the decimal precision. decimal.Decimal.quantize() rounds a Decimal to the given exponent (for currency formatting). Decimal Module belongs to the Math & Stats group alongside Math Module, Statistics Module, Random Module, Fractions Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground. Python Reference documents 978+ functions, methods, and modules across 114 categories of the standard library, and every entry in this Decimal Module category follows the same format — syntax first, then what it does, the parameters it accepts, what it returns, and a working code example — so once you have read one page you can read them all.