Re: str(float) python 3 versus 2.7

2016-05-24 Thread Robin Becker
On 23/05/2016 18:05, Ian Kelly wrote: On Mon, May 23, 2016 at 10:39 AM, Robin Becker wrote: . If you want to show the float in a less noisy format, you can explicitly format it using the 'g' or 'n' presentation type, which essentially round to a given precision and strip off trailing

Re: str(float) python 3 versus 2.7

2016-05-23 Thread Ian Kelly
On Mon, May 23, 2016 at 10:39 AM, Robin Becker wrote: > I had always imagined that the str founction did some kind of rounding on > floats to prevent small numerical errors from showing up. The 2.7 > documentation starts like this > >> class str(object='') >> Return a string containing a nicely pr

str(float) python 3 versus 2.7

2016-05-23 Thread Robin Becker
I had always imagined that the str founction did some kind of rounding on floats to prevent small numerical errors from showing up. The 2.7 documentation starts like this class str(object='') Return a string containing a nicely printable representation of an object. For s However, I see a