[Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers) (original) (raw)
BJörn Lindqvist bjourne at gmail.com
Wed Aug 2 18:06:40 CEST 2006
- Previous message: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)
- Next message: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 8/2/06, M.-A. Lemburg <mal at egenix.com> wrote:
Greg Ewing wrote: > In all my programming so far I've found > numerous uses for round-to-int, and exactly > zero uses for round-binary-float-to-decimal- > places. So from my point of view, the YAGNI > applies to the current behavour of round()!
Most typical uses of round() don't use the optional argument, true, but I still fail to see what returning an integer instead of a float would buy you.
One hundred and sixty two type conversions!
http://www.google.se/search?hl=sv&q=filetype%3Apy+%22int%28round%22&btnG=S%C3%B6k&meta=
-- mvh Björn
- Previous message: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)
- Next message: [Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]