Re: str more precise in 3 as 2.7

2015-04-29 Thread Steven D'Aprano
On Wednesday 29 April 2015 21:24, Cecil Westerhof wrote: > I am trying to make my modules also work under Python 3. I found that > str is more precise in Python 3. The expression: > str(134 / 6.0) > gives in 2.7.8: > '22.33' > and in 3.4.1: > '22.332' The precise d

Re: str more precise in 3 as 2.7

2015-04-29 Thread Cecil Westerhof
Op Wednesday 29 Apr 2015 13:55 CEST schreef Chris Angelico: > On Wed, Apr 29, 2015 at 9:24 PM, Cecil Westerhof wrote: >> I am trying to make my modules also work under Python 3. I found >> that str is more precise in Python 3. The expression: str(134 / >> 6.0) gives in 2.7.8: '22.33' and

Re: str more precise in 3 as 2.7

2015-04-29 Thread Chris Angelico
On Wed, Apr 29, 2015 at 9:24 PM, Cecil Westerhof wrote: > I am trying to make my modules also work under Python 3. I found that > str is more precise in Python 3. The expression: > str(134 / 6.0) > gives in 2.7.8: > '22.33' > and in 3.4.1: > '22.332' > > Was not ver

Re: str more precise in 3 as 2.7

2015-04-29 Thread Mark Lawrence
On 29/04/2015 12:24, Cecil Westerhof wrote: I am trying to make my modules also work under Python 3. I found that str is more precise in Python 3. The expression: str(134 / 6.0) gives in 2.7.8: '22.33' and in 3.4.1: '22.332' Was not very hard to solve: if