[Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.133.2.1,1.133.2.2

Guido van Rossum guido@digicool.com
Mon, 21 May 2001 14:05:03 -0400


> ***************
> *** 2610,2617 ****
>   \begin{verbatim}
>   >>> x = 10 * 3.14
> ! >>> y = 200*200
>   >>> s = 'The value of x is ' + `x` + ', and y is ' + `y` + '...'
>   >>> print s
> ! The value of x is 31.4, and y is 40000...
>   >>> # Reverse quotes work on other types besides numbers:
>   ... p = [x, y]
> --- 2610,2617 ----
>   \begin{verbatim}
>   >>> x = 10 * 3.14
> ! >>> y = 200 * 200
>   >>> s = 'The value of x is ' + `x` + ', and y is ' + `y` + '...'
>   >>> print s
> ! The value of x is 31.400000000000002, and y is 40000...
>   >>> # Reverse quotes work on other types besides numbers:
>   ... p = [x, y]

Hmm...  The tutorial now contains at least one example of floating
point imprecision.  Does it also contain text to explain this?  (I'm
sure Tim would be happy to provide some if there isn't any. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)