Glossary: Python Beyond the Basics
Decimal
Also written: decimal, quantize, InvalidOperation
A number type for exact decimal arithmetic, used for money so amounts add up with no tiny float errors. `.quantize(CENT)` rounds to two decimal places.
Glossary: Python Beyond the Basics
Also written: decimal, quantize, InvalidOperation
A number type for exact decimal arithmetic, used for money so amounts add up with no tiny float errors. `.quantize(CENT)` rounds to two decimal places.