prePEP: Decimal data type

Emile van Sebille emile at fenx.com
Thu Nov 6 09:35:39 EST 2003


Alex Martelli:
> Thus, for most accounting programs intended to run within the EU
(not just
> in Euros: these provisions also apply to the other non-Euro
currencies, as
> far as EU law is concerned), I do NOT think it would be a good thing
for
> the programmer to have to remember to round explicitly -- the legal
mandate
> is about rounding rules and it's quite easy to avoid the "fail to
meet the
> requirements", as they seem designed to be easy to meet.
>

These rules must apply to the subset of accounting situations that
involve exchange of funds.  However, pricing and costing of some items
regularly require a number of post-decimals beyond the '3 then round'
as you say is mandated.  An encforced rounding policy provided by a
Money subclass would require the programmer to invent work arounds for
these situations.  EIBTI   (Cool! I just learned what that means.)

--
Emile van Sebille
emile at fenx.com






More information about the Python-list mailing list