[Python-Dev] Return type of round, floor, and ceil in 2.6 (original) (raw)

Aahz aahz at pythoncraft.com
Sun Jan 6 02:04:09 CET 2008


On Sat, Jan 05, 2008, glyph at divmod.com wrote:

At first I didn't realize why I'd missed this feature. While the rounding modes are well documented, though, after 20 minutes of reading documentation I still haven't found a method or function that simply rounds a decimal to a given significant digit. Is there one, should there be one, or is the user simply meant to use Context.quantize with appropriate arguments?

Rephrasing Uncle Timmy: Decimal has so far focused on adhering to the decimal standard, not on providing convenience to users. As long as the core continues to adhere to the standard, there's no reason not to add convenience.

Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.



More information about the Python-Dev mailing list