[Python-Dev] Rounding float to int directly ...

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Aug 3 04:21:05 CEST 2006


Nick Coghlan wrote:

> Another option would be to provide this as a method of float objects 
> (similar to decimal).

That wouldn't be so good. Either kind of rounding ought to be
a function that you can apply without knowing what kind of
number you've got -- int, float, Decimal, or something else.

--
Greg


More information about the Python-Dev mailing list