[PySide] Strange behaviour of QLocale.toString()

Zak pyside at m.allo.ws
Sun Apr 14 22:43:32 CEST 2013


Here is a summary for the people who don't want to read a wall of text:

This is not a bug, PySide uses 32 bit floating points and PyQt uses 64 
bit floating points, so they round numbers differently.

I recommend using decimal.Decimal in the Python standard library to 
avoid rounding errors. Unfortunately, this makes it a little harder to 
do localization (switching commas for periods and such).

Zak F.



More information about the PySide mailing list