[Python-ideas] Deprecate the round builtin
ironfroggy at gmail.com
Thu Sep 27 03:14:32 CEST 2012
On Wed, Sep 26, 2012 at 2:55 PM, Guido van Rossum <guido at python.org> wrote:
> 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?
I think it is reasonable with the right justifications, deprecation period, and
obvious migration path.
Also, I'd be completely in support of dropping round() and agree it gets misused
and leads to too much confusion. We should promote the right ways, and some
times to show the right path you need to lock another door and throw
away the key.
> --Guido van Rossum (python.org/~guido)
> Python-ideas mailing list
> Python-ideas at python.org
Read my blog! I depend on your acceptance of my opinion! I am interesting!
Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy
More information about the Python-ideas