Why not FP for Money?

Paul Rubin http
Sat Sep 25 01:42:41 CEST 2004

aleaxit at yahoo.com (Alex Martelli) writes:
> You're probably right, but it will be nice to be able to point the
> querants to module decimal.  Backwards incompatible changes, such as
> taking a literal of 1.1 to mean a decimal rather than a float, are not
> in the cards until Python 3.0 time

That kind of change (without a top-of-file declaration like 
"import __decimal__") sounds a bit extreme even for 3.0.  However,
adding a backwards-compatible syntax ("a = 1.1d"), or a declaration
to read all literals like 1.1 as decimal, seems ok to consider.

More information about the Python-list mailing list