Good morning, i'm starting a project in python, for a documents-of-transport, invoice, etc.
In this project i need to use the DECIMAL type, but i need to set the right scale precision (ex: for the VAT i need to have 1 digit, for the quantity in d.o.t. i need to have 2 digits).
In Postgresql i have the NUMERIC data type, that permits to set the scale precision, but i haven't find something similar in python.
The scale precision is fundamental (ex. here in italy the invoices must have 2 digit precision: if i multiply a price for 1.22 -the normal VAT in italy-, i need to keep the 2 digit in the result).
i see there is a context-environment precision, but no variable-intrinsic-precision
In this project i need to use the DECIMAL type, but i need to set the right scale precision (ex: for the VAT i need to have 1 digit, for the quantity in d.o.t. i need to have 2 digits).
In Postgresql i have the NUMERIC data type, that permits to set the scale precision, but i haven't find something similar in python.
The scale precision is fundamental (ex. here in italy the invoices must have 2 digit precision: if i multiply a price for 1.22 -the normal VAT in italy-, i need to keep the 2 digit in the result).
i see there is a context-environment precision, but no variable-intrinsic-precision