Toppling the numeric tower

Guido van Rossum guido at
Thu Jul 26 17:26:26 EDT 2001

"Tim Hochberg" <tim.hochberg at> writes:

> >>> 1e0 << 2e0
> 4 # exact
>   or
> 4e0 # inexact
> Either answer sucks: the first turns two inexact operands into an exact
> result, while the second represents the results of bit twiddling, a discrete
> operation if ever there was one, as an inexact, floating point number. The
> best choice is to insist on exact numbers for integer operations.


> Note that I don't know that this is the meaning for isintegral meant by PEP
> 228, but it is the one that makes sense to me.

I don't know why PEP 228 doesn't reference Scheme.  It is clearly
inspired by Scheme.  See

--Guido van Rossum (home page:

More information about the Python-list mailing list