PEP 238 (revised)

Guido van Rossum guido at python.org
Tue Jul 31 02:39:21 EDT 2001


Chris Barker <chrishbarker at home.net> writes:

> [...] The problem, for me, is that
> 1.0 can't be used as a sequence index. While it may not be know whether
> x//y is an exact value, it IS know that it is an integer value, and
> should therefor be usable as an index. This brings up the usefulness of
> the concept of the inexact integer.

Totally useless IMO -- and wrong.  If it's inexact, that means it could
really be  any number inside some interval around the represented
value, and thus by definition you can't tell whether it is an Integer
at all.

> I'm also not so sure about your above rational: While I do understand
> that the result of x//y may not be an exact number, given that x and/or
> y may not be exact, the question is: does that matter? Acn anyone think
> of a case where they would use // (or floor, or ceil, or round) when it
> would hurt for the final result to be considered exact?

When the width of the inexactness interval is larger than 1, there's
more than one Integer that's the possible result, so we don't know the
result exactly.

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



More information about the Python-list mailing list