M.-A. Lemburg wrote: > I suppose you don't know about the optional argument > to round that lets you round up to a certain decimal ?! Yes, I know about, but I rarely if ever use it. Rounding a binary float to a number of decimal places seems a fundamentally ill-considered thing to do anyway. What are the use cases for it, given that one can easily select a number of decimal places when formatting a number for display? > If we were to follow your suggestion, we'd have round() > return an integer when called without the argument and > a float when called with the argument. No, round() wouldn't have that option at all. If you wanted it, you would use fround() instead, which would have the option and return a float always. This would be a Py3k thing, obviously. If done before then, the new function would have to be given a different name. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4