[Python-Dev] Rounding Decimals

Leif Walsh adlaiff6 at gmail.com
Mon Jan 14 00:41:50 CET 2008


On Jan 13, 2008 6:12 PM, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
> On Jan 12, 2008 8:21 PM, Guido van Rossum <guido at python.org> wrote:
> >
> > On Jan 12, 2008 5:09 PM, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
> > > During the discussion about the new Rational implementation
> > > (http://bugs.python.org/issue1682), Guido and Raymond decided that
> > > Decimal should not implement the new Real ABC from PEP 3141. So I've
> > > closed http://bugs.python.org/issue1623 and won't be pursuing any of
> > > the extra rounding methods mentioned on this thread.
> >
> > Well, I didn't really decide anything. I suggested that if the
> > developers of Decimal preferred it, it might be better if Decimal did
> > not implement the Real ABC, and Raymond said he indeed preferred it.
> >
> > Since this reduces the usefulness of numeric.Real, I'm somewhat
> > disappointed in this outcome (as I imagine you are). However, Decimal
> > has very little of my own sweat in it, and a lot of Raymond, Facundo
> > (and others, including Mark), and the ABC thing is still somewhat
> > experimental, so it wouldn't make sense for me to impose my ideas onto
> > Decimal unilaterally, and I'm sure Raymond etc. have their reasons.
>
> Sorry for misrepresenting you. I am a little disappointed, but if
> we're right that numbers.Real is a good idea, then users will ask for
> Decimal to implement it, and the Decimal developers can change their
> minds in 3.1. Since I'm not one of those users, I'm not the right
> person to argue for this anyway. :)

I haven't been watching the python-dev list for very long, so maybe
this has already been discussed ad nauseam (in which case, sorry),
but, from the devil's advocate-ish mathematics side of things, unless
numbers.Decimal is planned to be implemented with infinite precision
(which I doubt, but could not confirm with an admittedly small amount
of research), shouldn't it implement numbers.Rational instead?  Was
this ever discussed, or was it just assumed that numbers.Real was the
right decision?

Cheers,
Leif


More information about the Python-Dev mailing list