[Python-ideas] Deprecate the round builtin

Daniel Holth dholth at gmail.com
Wed Sep 26 23:21:40 CEST 2012

Normally deprecation means you keep it forever but don't mention it much in
the docs...
On Sep 26, 2012 5:16 PM, "Mark Adam" <dreamingforward at gmail.com> wrote:

> > On the other hand, having round with a second parameter to return a
> Decimal
> > would be quite usefull. I can't see a way of changing the type returned
> > by the built-in round without crashing half the World --- but maybe it
> would
> > be possible to deprecate only the two-parameter form of the built-in
> round,
> > and add a decimal.round Decimal factory?
> On second thought, the idea of "namespaces" within the interpreter
> (like Tim Peters was suggesting I think in the doctest module) could
> put some order to built-ins and globals within the interpreter.
> round(), hex() and others could be in the namespace "Numbers" (Named
> by their associated type), similarly for the other type-specific
> builtins.
> Create a keyword "expose" to dump a particular namespace into the
> global scope when you don't want to type "Numbers.round(f)".
> Thoughts?
> markj
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120926/77691ce0/attachment.html>

More information about the Python-ideas mailing list