[Python-ideas] Deprecate the round builtin
greg.ewing at canterbury.ac.nz
Wed Sep 26 23:29:20 CEST 2012
M.-A. Lemburg wrote:
> In calculations, statistics, numeric, etc. such corner cases are
> not all that common, so things are not as bad as they may appear
> on first sight.
If the corner cases don't matter, I'd say you don't
need to round your internal representations in the
first place. Rounding on output is sufficient and
If they *do* matter -- such as when cents need to
add up exactly -- you're much better off using
Decimals. Two-argument round() is an attractive
nuisance in that case, IMO.
More information about the Python-ideas