On Sun, Jul 17, 2016 at 4:04 AM, Random832 <random...@fastmail.com> wrote: > On Sat, Jul 16, 2016, at 03:27, Chris Angelico wrote: >> Will an "Exact" non-integer be stored as Decimal or >> Fraction? How do you know? They have vastly different semantics, and >> you should be able to choose. > > Er, the point is for them to _not_ have different semantics. A decimal > storage format would simply be an optimization for a fraction whose > denominator is a power of 10 (or of 2 and 5) > > The semantics of the current Decimal class are those of an inexact > number.
In that case, an 'Exact' non-integer will have appalling performance - fractions.Fraction doesn't really work all that nicely when the numbers start getting huge. ChrisA -- https://mail.python.org/mailman/listinfo/python-list