[Python-Dev] Rounding Decimals

Leif Walsh adlaiff6 at gmail.com
Mon Jan 14 01:37:46 CET 2008


On Jan 13, 2008 7:26 PM, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
> Guido mentioned the possibility briefly at
> http://mail.python.org/pipermail/python-3000/2007-April/007015.html
> ("One could argue that float and Decimal are <:Q, but I'm not sure if
> that makes things better pragmatically") but never really discussed as
> far as I can find (although I did think about it :).

Well, if nothing else, I'm certainly satisfied that my concerns about
accuracy are being addressed.  I will have to go read more of that
discussion.

> I prefer having
> float not implement Rational (Decimal's off the table) because
> developers usually think of them as approximations to arbitrary,
> possibly-irrational, real numbers, rather than as rational numbers
> with some odd constraints on their denominators. That is, to me, the
> ABCs a type implements are more about how developers should think
> about the type than the implementation of the type.

I see where you're coming from.  My personal stance is that developers
_shouldn't_ think that way, but I know that's an unpopular opinion,
and isn't really worth discussion here.

> [ A new thread is probably appropriate if anyone wants to discuss the
> philosophy, but I probably won't participate... ]

I don't feel any pressing need to continue this here and now.

Thanks!

-- 
Cheers,
Leif


More information about the Python-Dev mailing list