4 hundred quadrillonth?

Luis Zarrabeitia kyrie at uh.cu
Wed May 27 11:07:21 EDT 2009


On Thursday 21 May 2009 08:50:48 pm R. David Murray wrote:

> In py3k Eric Smith and Mark Dickinson have implemented Gay's floating
> point algorithm for Python so that the shortest repr that will round
> trip correctly is what is used as the floating point repr....

Little question: what was the goal of such a change? (is there a pep for me to 
read?) Shouldn't str() do that, and leave repr as is?

While I agree that the change gets rid of the weekly newbie question 
about "python's lack precision", I'd find more difficult to explain why
0.2 * 3 != 0.6 without showing them what 0.2 /really/ means.

-- 
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie



More information about the Python-list mailing list