[Python-ideas] Deprecate the round builtin

Raymond Hettinger raymond.hettinger at gmail.com
Thu Sep 27 01:47:57 CEST 2012


On Sep 26, 2012, at 7:07 PM, Steven D'Aprano <steve at pearwood.info> wrote:

> Pretty much *everything* about binary floats is surprising to people
> who expect decimal semantics. Unless we're going to make Decimal the
> default floating point type, and shift binary floats to a module, I
> don't see any way around that, and a particularly don't see any reason
> to single round() out as more confusing than any of the other float
> gotchas.
> 
> Speaking from my experience on the tutor@ and python-list at python.org
> mailing lists, I believe that problems with round are vanishingly rare,
> probably an order of magnitude fewer than "why doesn't Python add my
> two floats correctly?" type questions.

My experience teaching and consulting is matches your experience on tutor.
I agree with your suggestion to leave round() untouched.


Raymond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120926/3f89899c/attachment.html>


More information about the Python-ideas mailing list