[Python-Dev] Different float formatting on Windows and Linux

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Tue Feb 19 01:20:22 CET 2008


> The tests for float.__format__ are breaking on Windows, because of this 
> issue: http://bugs.python.org/issue1600.  Basically, Windows is using 3 
> digits for exponents < 100, and Linux (and at least MacOS) are using 2.

Yes, this is very annoying and I once lost of lot of time because of the
Windows difference.

> I think the options are:
> 1: Do nothing.  Adapt the tests to deal with the differences.
> 2: Force 3 characters for exponents < 100.
> 3: Force 2 characters for exponents < 100.

I'd go for 3. Rationale: this change will mostly affect scientific code,
which is mostly developed and used on Unix systems.

Thanks for taking care if this nuisance!

Ralf





More information about the Python-Dev mailing list