Why not FP for Money?

Paul Rubin http
Fri Sep 24 07:36:55 CEST 2004


bokr at oz.net (Bengt Richter) writes:
> I'd prefer not to use up '$' for something that specialized.
> ISTM we already have a precedent with longs: i.e., an L suffix. So why not
> a D suffix for decimal literals? E.g.,
> 
>      a = 35.72D  # 35.7200D e.g. would specify greater guaranteed precision
>      b = 1.73D
>      a+b
>      37.45D

Lots of currency symbols are suffixed (3.52 DM) instead of prefixed.
How about $ as a suffix?

   a = 35.72$
   etc.   



More information about the Python-list mailing list