[docs] [issue17259] locale.format() rounding is not reliable for floats

R. David Murray report at bugs.python.org
Wed Feb 20 22:58:01 CET 2013


R. David Murray added the comment:

Perhaps Serhiy meant to direct your attention to the "note" in the round docs.  Floating point is tricky.

In Python3 the round is actually "half to even".  I'm not sure what the rounding algorithm is for %f, but I have a suspicion it might be half to even.  I suppose that it ought to be documented.

Note that this applies equally to regular string formatting, it's not something special about the locale module.

----------
assignee:  -> docs at python
components: +Documentation -Library (Lib)
nosy: +docs at python, eric.smith, mark.dickinson, r.david.murray
versions: +Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17259>
_______________________________________


More information about the docs mailing list