Re: round not rounding to 0 places

2006-08-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Tim Leslie <[EMAIL PROTECTED]> wrote: >On 16 Aug 2006 00:19:24 -0700, Fuzzydave <[EMAIL PROTECTED]> wrote: >> I have been using a round command in a few places to round >> a value to zero decimal places using the following format, >> >> round('+value+', 0) >> >> but

Re: round not rounding to 0 places

2006-08-16 Thread Fuzzydave
> Sybren Stuvel wrote: > round returns a float. Use > int(round('+value+', 0)) > to get an integer. > Sybren ahh of course it does, slaps own forehead sorted thanks :) David P -- http://mail.python.org/mailman/listinfo/python-list

Re: round not rounding to 0 places

2006-08-16 Thread Tim Leslie
On 16 Aug 2006 00:19:24 -0700, Fuzzydave <[EMAIL PROTECTED]> wrote: > I have been using a round command in a few places to round > a value to zero decimal places using the following format, > > round('+value+', 0) > > but this consistantly returns the rounded result of the value > to one decimal pl

Re: round not rounding to 0 places

2006-08-16 Thread Simon Forman
Fuzzydave wrote: > I have been using a round command in a few places to round > a value to zero decimal places using the following format, > > round('+value+', 0) > > but this consistantly returns the rounded result of the value > to one decimal place with a zero > > EG: > > 4.97 is returned as 5.0

round not rounding to 0 places

2006-08-16 Thread Fuzzydave
I have been using a round command in a few places to round a value to zero decimal places using the following format, round('+value+', 0) but this consistantly returns the rounded result of the value to one decimal place with a zero EG: 4.97 is returned as 5.0 when i want it returned as 5, does