Skip to content

Glossary: Python Beyond the Basics

cents storage (whole-number money)

Also written: to_cents, from_cents, cents

Storing money as a whole number of cents in an INTEGER column, because SQLite's REAL columns hold inexact floats. `Decimal("12.50")` is saved as 1250 and converted back when read.

Where the book teaches it

Related terms

DecimalSQLite