[issue4707] round(25, 1) should return an integer, not a float

Guido van Rossum report at bugs.python.org
Wed Jan 28 04:56:15 CET 2009


Guido van Rossum <guido at python.org> added the comment:

Well, that would leave a function whose return *type* depends on the
*value* of one of the arguments, which I find very ugly.

I don't know why you think rounding an int to X (X>0) digits after the
decimal point should return a float -- it's not like the int has any
digits behind the point, so nothing is gained. Why would it be a lie?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4707>
_______________________________________


More information about the Python-bugs-list mailing list