Skip to content

Glossary: Refactoring and Clean Code

Decimal

Also written: whole cents

A Python number type for exact decimal arithmetic, which makes it a better fit for money than `float`. Switching to it changes how numbers are calculated, so it is best done as a separate change from a refactoring.

Where the book teaches it

Related terms

Behavior