prePEP: Money data type

Jegenye 2001 Bt jegenye2001 at fw.hu
Sat Oct 18 06:35:33 EDT 2003


You're right, Alex, in that arithmetic is the real issue to be addressed,
not formatting..

I also wonder if computation error should be tracked with this class, i.e.
when you assign a Money type value of 1.21 then  you know that the error is
0.05 at most.
After that the usual error propagation rules apply for the arithmetic
operations..

Best,
Miklós
--
PRISZNYÁK  Miklós
---
Jegenye 2001 Bt. ( mailto:jegenye2001 at parkhosting.com )
Egyedi szoftverkészítés, tanácsadás
Custom software development, consulting
http://jegenye2001.parkhosting.com


Alex Martelli <aleax at aleax.it> wrote in message
news:Hg8kb.10423$e5.375653 at news1.tin.it...
> John Roth wrote:
>
> > Substantive issues:
> >
> > 1. I've seen lots of strange rounding policies in
> > various nooks and crannies. Is there any way of
> > specifying a rounding policy that would be used
> > and inherited by the result money object?
>
> As a side note, it's quite possible to spend inordinate
> amounts of attention on formatting.  I would suggest that
> a fundamental 'money' class should first of all nail down
> the *computation* issues (just that variety of rounding
> specs is gonna be SUCH a bear...!) and receiving and
> returning information.  Once that is done, one or more
> formatting functions can always be developed, be it as
> methods of the money class, a subclass, or whatever.  No
> Alex
>






More information about the Python-list mailing list