[Python-ideas] Deprecate the round builtin

Guido van Rossum guido at python.org
Wed Sep 26 20:55:10 CEST 2012

On Wed, Sep 26, 2012 at 11:51 AM, Mike Graham <mikegraham at gmail.com> wrote:
> The builtin round function is completely useless. I've never seen
> anyone use it constructively. Usually people using it are new
> programmers who are not comfortable with or aware of string
> formatting. Sometimes people use it to poorly replicate functionality
> that's implemented correctly in the decimal module.

You're probably right. It has ancient ancestry: it was one of the
functions I copied directly from ABC. (It's actually more useful now
that floats are printed with minimal digits.)

But given the pain of removing a builtin, is it worth it? maybe we can
just document the better ways of accomplishing its tasks?

--Guido van Rossum (python.org/~guido)

More information about the Python-ideas mailing list