April 2014
Beginner to intermediate
634 pages
15h 22m
English
We've looked at the built-in numeric types. We've also looked at the vast number of special methods required to invent a new numeric type. Specialized numeric types that integrate seamlessly with the rest of Python is one of the core strengths of the language. That doesn't make the job easy. It merely makes it elegant and useful when done properly.
When working with numbers, we have a multistep design strategy:
complex, float, and int.decimal and fractions. For financial calculations, decimal must be used; there is no alternative.