prePEP: Money data type

Batista, Facundo FBatista at uniFON.com.ar
Mon Oct 20 14:49:55 EDT 2003


#- 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

It's very temptating to str() just represent the number, and if you want
something else, overload it.

The problem is that decimalSeparator and thousandSeparator are important to
parse the string in the constructor (if I need str() to give me a ',' as
decimal point, I also need to supply a ',' as decimal point to the
constructor).

.	Facundo





More information about the Python-list mailing list