Why not FP for Money?

Alex Martelli aleaxit at yahoo.com
Fri Sep 24 03:28:20 EDT 2004


Carlos Ribeiro <carribeiro at gmail.com> wrote:
   ...
> A native Money type, either with the $ signal ($35.72) or the suffix
> (35.72D) would not present the same issues, because the literal would

Right, but in practice I find that:

def d(x): return decimal.Decimal(str(x))

appears to work pretty well, judging from early experimentation.


Alex



More information about the Python-list mailing list