Why not FP for Money?
Paul Rubin
http
Fri Sep 24 03:57:10 EDT 2004
More information about the Python-list mailing list
Fri Sep 24 03:57:10 EDT 2004
- Previous message (by thread): Why not FP for Money?
- Next message (by thread): Why not FP for Money?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
aleaxit at yahoo.com (Alex Martelli) writes: > > 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. Hmm. What does d(35.72) give you? The same thing as d('35.72')? Either answer is arguably wrong.
- Previous message (by thread): Why not FP for Money?
- Next message (by thread): Why not FP for Money?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list