Contribution: nice floating point number formatting
malcolmt at smart.net.au
Mon Nov 1 02:41:24 CET 1999
On Sun, Oct 31, 1999 at 05:41:26PM +0100, Carel Fellinger wrote:
> And for the spaces in the decimal part, are you shure that is conventional?
> I can't remember having seen this *ever* in my life. At least not in my life
> as a programmer.
There is a convention in some situations/places where the comma (or, in
Europe, the dot) is dropped entirely and a thin space is used (if you are
typesetting -- something smaller than a normal inter-word space).
You will notice I have couched that last paragraph somewhat cautiously: my
recollection is that this situation (using spaces) is meant to be standard,
these days but since everybody is used to using commas, etc, they still
appear quite frequently. IMVHO, the spaces every three digits look nicer
than throwing a bunch of punctuation marks at the number. :-)
(and if that doesn't start some sort of religious war, I don't know what
More information about the Python-list