decimal.localcontext()


Introduction
The function provide a method to set the precision point of the decimal value.

Example
import decimal
with decimal.localcontext() as python_lake:
    python_lake.prec=10
    z=decimal.Decimal(0.12)*decimal.Decimal(.123)
    print(z)

Ouput
>>> 
0.01476000000
>>> 

Comments